자유롭게 질의 및 응답을 할 수 있는 게시판입니다. 개발자 여러분의 답변이 큰 도움이 됩니다. 
  • 제품설치/등록 오류 문의: 설치/등록 Q&A 이용 (제품 구매 고객 한정)

제가 델파이를 시작한지 한달도 안된 사람입니다

델파이로 게산 기를 만드는 도중에 모르는것이 있어서 물어 볼려고요

계산기에 숫자를 입력하고 =이거를 붙이면 앞에있는 숫자가 다 계산 해서 텍스트에 입력이 되야 하는대 계산 하는 방법을 몰라서 물어 봄니다

제가 짠 소스는 이렀게 짰습니다 소스중에 틀린게 있으면 지적도 해주세요

 

var
  Form1: TForm1;
  but1,but2,but3,but4,but5,but6,but7,but8,but9,but10,q1,w2 : integer;

implementation

{$R *.fmx}

procedure TForm1.Button10Click(Sender: TObject);
begin
  //Text1.Text := inttostr(but10);
  Text1.Text := Text1.Text + '0';
end;

procedure TForm1.Button11Click(Sender: TObject);
begin
  //Text1.Text := Text1.Text - ' ';
end;

procedure TForm1.Button12Click(Sender: TObject);
begin
  Text1.Text := Text1.Text + '%';
end;

procedure TForm1.Button13Click(Sender: TObject);
begin
  Text1.Text := Text1.Text + '*';
end;

procedure TForm1.Button14Click(Sender: TObject);
begin
  Text1.Text := Text1.Text + '-';
end;

procedure TForm1.Button15Click(Sender: TObject);
begin
  Text1.Text := Text1.Text + '+';
end;

procedure TForm1.Button16Click(Sender: TObject);
begin
  Text3.Text := Text1.Text ;
  q1 := Text3.Text;
end;

procedure TForm1.Button1Click(Sender: TObject);
begin
  Text1.Text := text1.Text + '7';
end;

procedure TForm1.Button2Click(Sender: TObject);
begin
  Text1.Text := Text1.Text + '8';
end;

procedure TForm1.Button3Click(Sender: TObject);
begin
  Text1.Text := Text1.Text + '9';
end;

procedure TForm1.Button4Click(Sender: TObject);
begin
  Text1.Text := Text1.Text + '4';
end;

procedure TForm1.Button5Click(Sender: TObject);
begin
  Text1.Text := Text1.Text + '5';
end;

procedure TForm1.Button6Click(Sender: TObject);
begin
  Text1.Text := Text1.Text + '6';
end;

procedure TForm1.Button7Click(Sender: TObject);
begin
  Text1.Text := Text1.Text + '1';
end;

procedure TForm1.Button8Click(Sender: TObject);
begin
  Text1.Text := Text1.Text + '2';
end;

procedure TForm1.Button9Click(Sender: TObject);
begin
  Text1.Text := Text1.Text + '3';
end;

end.

번호 제목 글쓴이 날짜 조회 수
공지 [프로그래밍 강의] 2021.6~2021.12 관리자 2015.01.22 15804
공지 유용한 관련 사이트 관리자2 2014.03.20 54605
공지 본 게시판은 개발자 여러분들의 질문과 답변을 공유하는 공간입니다. 관리자 2012.01.10 98048
693 앱테더링으로 동일서브넷이 아닌 외부의 앱과 연결해 데이터를 주고 받을 수 있나요? [3] Humphery 2015.05.20 635
692 XE2에서 사용할 수 있는 "version control"이 무엇이 있을까요? [1] 관리자 2015.02.12 635
691 델파이는 왜 최소화, 최대화, 끄기 버튼을 새로 만드나요? [3] 엽기토끼이요 2019.03.14 637
690 Delphi 10.3 Rio 에서 bpl 프로젝트 설치 문제. [2] 대마왕 2018.12.24 639
689 XE8 update1 설치이후 Option 들어갈 때 오류발생 [5] 조용한아찌 2015.06.25 640
688 델파이5 데이터베이스 호환성 문의 [1] 사이더뷰 2015.03.16 641
687 델파이 베를린을 이용한 다음 지도 API관련 문의. [1] file 좋은나무 2017.02.14 641
686 Listview에서 DynamicAppearance를 이용하여 아이템을 만드는데 궁금한점이 있어서요. [4] file 종결자 2019.10.10 642
685 모바일 개발시 스크롤박스 문의입니다. [1] file silkroad99 2015.01.23 645
684 안드로이드 앱등록을 위해선느 API레벨 8 이상을 적용해야 한다고 하는데... [3] 지병철 2018.06.27 645
683 델파이 중복 폼 방지 질문드립니다. [1] 문여오 2019.05.23 647
682 [재문의]seattle 버전 ios9 "External Exception 434C4E47432B2B00" 에러 [3] 사랑남 2015.11.20 647
681 안드로이드 앱 컴파일 시 오류 준호승호 2018.07.16 649
680 CodeSite 질문 입니다. [3] 늦바람 2015.03.27 650
679 [공유] INI파일을 다루는 방법이 궁금합니다. 험프리 2017.08.25 651
678 [질문]Delphi XE7 Fastreport PDF 한글 깨짐 [1] 라다 2019.01.11 652
677 url 이미지를 리스트뷰에 출력 방법 [2] from5 2015.12.13 653
676 안드로이드 외부앱 실행 가능한가요 [1] kerry 2016.04.21 654
675 SetFocus 문의입니다 [2] 아폴로 2016.04.29 654
674 [마이그레이션] Panel의 Color 속성이 적용되지 않습니다. file 험프리 2015.12.28 654