자유롭게 질의 및 응답을 할 수 있는 게시판입니다. 개발자 여러분의 답변이 큰 도움이 됩니다. 
  • 제품설치/등록 오류 문의: 설치/등록 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 54583
공지 본 게시판은 개발자 여러분들의 질문과 답변을 공유하는 공간입니다. 관리자 2012.01.10 97999
573 TFDConnection 의 TimeOut 시간을 설정할 수 있을가요? [4] 짧굵 2017.04.26 820
572 Delphi 7 REST Client 개발 문의 [2] DevCK 2021.05.12 821
571 Delphi 10 Seattle 에서 DevExpress v15.1.5 버전이 설치가 되지 않습니다. [3] 도사 2015.12.08 823
570 tcxGrid 에서 Column 컬러 변경 [2] 가나다 2019.03.28 824
569 Appmethod 사용시, 안드로이드 시뮬레이터 에러 [1] radio 2015.02.23 826
568 FMX 멀티스레드 문제입니다. [4] file 아크나톤 2019.08.28 827
567 cannot resolve unit name 'Winapi. windows' file charlesseo 2015.12.15 829
566 DBMemo 컴퍼넌트에서 엔터키 누를때 음표(♪, 동그라미) 없애는 방법 file 델펀맨 2016.12.12 832
565 xe7 달력 앱 개발문의 [1] 사랑남 2015.03.12 833
» 델파이로 만들고있는 계산기 중 모르는게 있써서 물어봄니다 [2] 초짜 2018.06.17 840
563 FireDAC 쿼리 사용 시 일부데이터만 가져와 FetchAll을 호출해야 전체 데이터를 가져옵니다. file 험프리 2020.09.10 841
562 카메라 컴포넌트 관련 문의드립니다. [6] 최봉원 2018.09.10 842
561 윈도우10에서 리얼그리드 셀편집시 문제 [1] file 마이다스준 2017.02.08 842
560 델파이 기본 글꼴을 변경하는 방법이 궁금합니다. [4] 맛재현 2019.09.04 843
559 [마이그레이션][팁] 파라독스, dBase 데이터베이스 연결(FireDAC 이용) [1] file 험프리 2016.06.29 843
558 WebBrowser 샘플코드 질문입니다. ScorpioM 2015.01.15 850
557 [질문] cannot initialize oci environment 오류가 납니다. [2] Xiong 2016.04.19 851
556 Modal 창이 뒤로 숨는 현상 원인이 무엇일까요? file 도의 2016.12.02 852
555 catalina10.15.3 paserver20.0 실행에러 원인좀 알려주세요.. xe10.3 [3] 네오마스 2020.03.20 852
554 Edit창에 SelectAll 전체선택 김하나 2015.04.17 852