자유롭게 질의 및 응답을 할 수 있는 게시판입니다. 개발자 여러분의 답변이 큰 도움이 됩니다. 
  • 제품설치/등록 오류 문의: 설치/등록 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 15769
공지 유용한 관련 사이트 관리자2 2014.03.20 54587
공지 본 게시판은 개발자 여러분들의 질문과 답변을 공유하는 공간입니다. 관리자 2012.01.10 98009
2959 안녕하세요~ 베를린Update2 버전 사용중인데 다중클라이언트가 동시에 조회하거나 자료수정할때 짧굵 2019.04.04 124
2958 IOS와 안드로이드에서 설치되어있는 폰트명 가져오는 방법 100jk 2019.04.25 124
2957 델파이 XE7 폼이동 관련 질문입니다. 우우우와와 2019.11.12 124
2956 [10.3.3 브리핑] RAD서버의 부하 분산 등은 어떻게 되나요? 험프리 2019.12.05 124
2955 IDETheme.ActnCtrls 에러 [1] file Riley 2020.04.17 124
2954 xe8 에서 tbluetoothledevice에서 onconnect, ondisconnect 이벤트 [1] jojo 2016.03.03 124
2953 Connection Profile Manager Error 박정희 2016.11.22 125
2952 데이터스냅 미들웨에 메소드 호출문의 입니다 천년바우 2017.08.15 125
2951 [10.2 도쿄 출시세미나] ClassGroup은 10.2부터 추가된 건가요? 그리고, 멀티플랫폼 개발에서 unit작성할때마다 필수로 추가해야 하나요? 험프리 2017.04.06 125
2950 ClientDataSet open 안드로이드는 문제없이 돌아가는데 ios에서 아래 메세지가 뜹니다. [1] kerry 2015.10.27 125
2949 [시애틀 출시세미나] 델파이 IDE 메뉴 가이드북은 없나요? Humphery 2015.09.11 126
2948 로그캣 및 토스트 질문입니다. 엘타 2016.08.31 126
2947 XE7 Android 6.0 실행시 문제.. [1] 손인호 2016.09.24 126
2946 Class TLabelEffect not found [3] 훈기 2017.10.31 126
2945 PointMobileBI07모델 샘플자료 에러입니다. [1] 김종찬 2018.07.30 126
2944 [10.3 리오 출시 세미나] 10.2 도쿄 라이센스(서브스크립션)로 사용중인데, 10.3 라이센스를 별도로 취득하는 행위를 해야하나요? 험프리 2018.11.26 126
2943 [세미나][DavidI] BeaconFence의 인식 범위는 어느정도까지 가능한가요? 험프리 2015.10.21 126
2942 [시작하는 사람들을 위한 델파이 프로그래밍] 모듈 14 - Exercise 2 관리자 2016.05.10 127
2941 [시작하는 사람들을 위한 델파이 프로그래밍] 모듈 18 - Exercise 2 [1] 관리자 2016.05.27 127
2940 업데이트 서브스크립션 구입방법? [1] 100jk 2019.05.29 127