자유롭게 질의 및 응답을 할 수 있는 게시판입니다. 개발자 여러분의 답변이 큰 도움이 됩니다. 
  • 제품설치/등록 오류 문의: 설치/등록 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 15765
공지 유용한 관련 사이트 관리자2 2014.03.20 54579
공지 본 게시판은 개발자 여러분들의 질문과 답변을 공유하는 공간입니다. 관리자 2012.01.10 97982
3219 사용자 컴포넌트 제작하는 방법이 있나요? [1] 하얀돌고래 2021.04.26 13336
3218 10.4.2 코드인사이트 기능에 대해 [1] file delphiman 2021.04.16 382
3217 VB, FORTRAN 소스코드를 Delphi로 변환하는 방법이 있나요? [1] 험프리 2021.04.21 314
3216 윈도우 키오스크에서 손가락으로 TImage 의 Canvas에 선 그리는 방법 [1] file 미스터몽키 2021.04.19 572
3215 DataSnap ClientDataSet 연결문의드립니다. [1] 블랙 2021.04.06 352
3214 C#에서 만든 DLL 사용 가능 합니까? [1] midas 2021.04.12 1096
3213 LOCKBOX의 CODEC컴포넌트에서 AES 복호화시 유니코드 에러 입니다 ㅠ 돌떵이이11 2021.04.20 450
3212 interbase togo [1] 희망나라 2021.04.03 320
3211 firedac 질문입니다. [1] file 희망나라 2021.04.03 218
3210 사용자 컴포넌트 추가를 해도 tool Palette에 보이지 않음 [1] file 추도사 2021.04.14 236
3209 FireDac Transaction 문의 [2] BD 2021.04.19 1115
3208 code insight Auto invoke 기능 질문합니다. LYNN 2021.04.12 216
3207 interbase Desktop 가격정책 문의 [1] 밤바야 2021.04.07 531
3206 delphi7에서 dbe를 이용한 mssql에서 저장프로시져 호출하여 작업하면 이상없는데. xe10.4에서 fireDAC을 이요하면 멈춤 추도사 2021.04.08 355
3205 tuple 을 사용할수 없나요? [3] file 하루 2021.04.01 310
3204 TGridPanelLayout 아이템 삭제 [3] 공수래 2021.04.01 231
3203 델파이 openCV 설치 관련 질문.. [2] file 아놀드 2021.03.16 680
3202 안드로이드 APK확장파일 생성 방법 문의 드립니다. 그니 2021.03.30 262
3201 firedac 질문입니다 [4] file 희망나라 2021.03.29 296
3200 델파이 10.4에서 10.3.3 에서 되던 fcm push가 안됩니다. [3] 델파이_사랑 2020.12.04 449