자유롭게 질의 및 응답을 할 수 있는 게시판입니다. 개발자 여러분의 답변이 큰 도움이 됩니다. 
  • 제품설치/등록 오류 문의: 설치/등록 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 35355
공지 유용한 관련 사이트 관리자2 2014.03.20 74911
1012 C++ builder 10.2 에서 Android 에 쓰래드 사용시 종료 문제 [1] 쿠리 2018.05.25 327
1011 XE 10.1 Berlin Android SDK Manager 를 찾을 수가 없습니다. [2] jongik 2018.05.28 450
1010 10.2 도쿄 안드로이드 에뮬레이터 세팅 관련 [1] 스머프 2018.05.28 625
1009 delphi 10.2.3 도쿄 다국어 관련 질문입니다. [10] file 신우 2018.05.28 578
1008 delphi 10.2 Active X 등록 방법 [1] 건들다맞지 2018.05.30 839
1007 안드로이드 기반에서 mysql 데이터 베이스로 바로 접속하는 방법 없나용? [1] 김종찬 2018.05.30 471
1006 ftps를 구현하고 싶습니다 [1] 맛재현 2018.05.30 306
1005 삼성폰에서 TEdit 엔터키를 입력하면 앱이 죽어 버립니다. 파이어버드 2018.05.31 308
1004 마이그레이션중 LoadLibrary 문제 확인부탁드립니다. file 최진현 2018.06.05 356
1003 현제 Delphi 10.2 트라이얼 테스트중입니다. [1] 이룬 2018.06.06 340
1002 [문의]delphi 10.2.3 도쿄에서 JEDI 패키지 설치시 에러 [1] 데르파이 2018.06.07 333
1001 Delphi10.2 용 평가판에서 BDE Install 프로그램(dclbde***.bpl) [1] hihee 2018.06.07 626
1000 RAD Server [EMS] 배포관련 오류 [1] 마눠니 2018.06.10 532
999 iOS 컴파일 오류 문의 [1] file 생각 2018.06.11 646
998 FDMemTable 문의입니다. 최민철 2018.06.12 322
997 DragMode가 dmAutomatic일 때, 클릭 이벤트 작동하지 않음 VT 2018.06.12 387
996 컴포넌트 아이콘 표시가 안나올때 [1] file 건들다맞지 2018.06.14 420
995 sqlite DB에 POST하면 에러(database is locked)가 발생합니다. [2] 스카이 2018.06.14 2274
» 델파이로 만들고있는 계산기 중 모르는게 있써서 물어봄니다 [2] 초짜 2018.06.17 1034
993 델파이 5.0 스페인어 Richtext box 깨어지는 문제해결 방법? [1] file 여호수아 2018.06.19 296