자유롭게 질의 및 응답을 할 수 있는 게시판입니다. 개발자 여러분의 답변이 큰 도움이 됩니다. 
  • 제품설치/등록 오류 문의: 설치/등록 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 15766
공지 유용한 관련 사이트 관리자2 2014.03.20 54580
공지 본 게시판은 개발자 여러분들의 질문과 답변을 공유하는 공간입니다. 관리자 2012.01.10 97985
3099 [세미나: 데이터와 RAD] 데모를 이전 버전으로 돌려보는 것도 가능할까요? 험프리 2020.06.24 106
3098 두개의 화면을 뛰어놓고 번갈아가면서 클릭했을때 먹통되는 현상이 발생됩니다. 미주 2019.07.29 106
3097 스프레쉬가 안 나타납니다. [1] file 거북이 2015.11.11 106
3096 [시작하는 사람들을 위한 델파이 프로그래밍] 모듈 15 - Exercise 2 [1] 관리자 2016.05.27 107
3095 Datasnap에서 Servercontainer에 timer 컴포넌트 사용 [1] file 파란하늘 2017.09.06 107
3094 델파이 사용중 문의 드립니다. 씨엠 2017.09.21 107
3093 xe 10.2 에서 Form transparency 기능 문의 vastia 2017.07.20 107
3092 문의 드립니다. [1] file 한량이 2019.08.02 107
3091 [에러] 64비트로 컴파일시, 빌더가 설치되지 않은 피시에서 에러 발생 file lamp 2019.12.09 107
3090 GetIt 으로 patch 다운로드가 안됩니다. [1] file 하루 2020.05.29 107
3089 linux console에서 webbrowser에러 100jk 2021.02.23 107
3088 샐행 오류 [1] file 한아 2016.10.06 108
3087 git이 먹히지 않는데 어떻게 하나요? 나즈나 2016.07.12 108
3086 멀티디바이스 기본 MasterDetail 템플릿에서 데이터들은 어디서 가져오나요? [2] Vincent 2017.09.22 108
3085 델파이 10.2.3 에서 IOS 키입력창 문제 부분 [1] delphiman 2019.01.15 108
3084 윈도우버젼에 따른 UI변화? 해결방법이 있나요 June 2019.07.25 108
3083 리눅스용 CPort [1] pky4437 2020.05.29 108
3082 [TRibbon] 텍스트 크기 설정에 따른 TRibbon 장애 문의입니다. file 초보델팡이 2020.06.22 108
3081 TBeacon 컴포넌트 사용에 관련하여 질문드립니다. [1] 반벽이 2015.09.04 109
3080 VCL 파일 배포 질문. syc 2016.05.27 109