자유롭게 질의 및 응답을 할 수 있는 게시판입니다. 개발자 여러분의 답변이 큰 도움이 됩니다. 
  • 제품설치/등록 오류 문의: 설치/등록 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 15634
공지 유용한 관련 사이트 관리자2 2014.03.20 54464
공지 본 게시판은 개발자 여러분들의 질문과 답변을 공유하는 공간입니다. 관리자 2012.01.10 97828
3259 Multi-Device Application 질문입니다. [2] UK'S 2021.08.12 949
3258 현재 회사에서 xe2를 사용 중인데 동일 PC에 도쿄버전을 같이 설치하여 사용해도 괜찮나요? zenojm 2017.12.05 602
3257 중국어 깨짐.. [1] 시작.. 2021.08.06 663
3256 ios [1] file 지구수비방위대 2021.08.09 329
3255 IOS 화면 가로 고정으로 배포 오류 문의 [4] 2an 2021.08.04 343
3254 TFDConnection TimeOut [1] 지구수비방위대 2021.07.06 430
3253 MacOS 빌드 Error [1] Sangin 2021.08.03 351
3252 [질문] FMX화면에서 싸인이 가능한가요? [2] 화현 2021.07.22 296
3251 cxGrid의 OnCustomDrawIndicatorCell 이벤트 문의드립니다. [2] 딤몽 2021.07.26 394
3250 개발툴 업그레이드 XE2 를 XE7 이나 XE8로 [1] 가나다 2021.07.20 278
3249 ScrollBox안에 Edit 가상키보드 문제.. [4] 운직 2021.07.14 670
3248 Getit 에서 제공되던 Winsoft의 컴포넌트 들이 안보입니다. sihwan 2021.07.15 238
3247 FastReport 관련 문의 [1] 쿤이 2021.07.12 285
3246 class EOleSysError 문제 file 김준수 2021.06.23 465
3245 C++ DLL 동적 배열을 어떻게 받아야 하나요? [1] 까막 2021.06.17 421
3244 Apple healthkit 사용법에 대해 도움 요청 드립니다. [2] 지병철 2021.06.18 510
3243 애플 인증서 오류 관련하여 문의드립니다. [3] file delphiman 2021.05.11 3696
3242 엑셀 매크로 질문입니다. [2] 희망나라 2020.05.15 559
3241 ios 앱 빌드 관련 문의 [2] 초보개발자 2021.05.03 515
3240 iOS에서 Android에서처럼 사용되는 Toast 질문입니다. [1] 랩실전기 2021.05.11 508