자유롭게 질의 및 응답을 할 수 있는 게시판입니다. 개발자 여러분의 답변이 큰 도움이 됩니다. 
  • 제품설치/등록 오류 문의: 설치/등록 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 17087
공지 유용한 관련 사이트 관리자2 2014.03.20 55928
공지 본 게시판은 개발자 여러분들의 질문과 답변을 공유하는 공간입니다. 관리자 2012.01.10 99368
959 MainMenu의 글자크기를 크게할 수 있나요? file 험프리 2017.03.23 832
958 Delphi 7 REST Client 개발 문의 [2] DevCK 2021.05.12 832
957 cannot resolve unit name 'Winapi. windows' file charlesseo 2015.12.15 833
956 FMX 멀티스레드 문제입니다. [4] file 아크나톤 2019.08.28 834
955 tcxGrid 에서 Column 컬러 변경 [2] 가나다 2019.03.28 835
954 xe7 달력 앱 개발문의 [1] 사랑남 2015.03.12 835
953 [FireDAC][Stan][Def]-254 오류 해결방법 [1] 밥먹자 2017.05.12 836
952 DBMemo 컴퍼넌트에서 엔터키 누를때 음표(♪, 동그라미) 없애는 방법 file 델펀맨 2016.12.12 842
951 TFDConnection 의 TimeOut 시간을 설정할 수 있을가요? [4] 짧굵 2017.04.26 842
950 인터베이스 "arithmetic exception numeric overflow or string truncation cannot transliterate character between character sets."오류는 어떻게 해결할 수 있나요? file Humphery 2015.05.26 842
949 안녕하세요. 안드로이드 전화 끊기 문의 입니다. [1] jang 2016.12.01 844
948 indy udp 서버로 수신한 데이터에 대한 응답을 udp로 보내는 echo 서버를 만들었는데 [2] 금목암 2019.11.15 846
947 퀵리포트 -> PDF 변환 시 한글 깨짐 현상 질문입니다. [3] 으아앙 2021.06.03 848
946 안드로이드 앱 작성시 일부만 기본 스타일을 사용하고 싶습니다. [1] 델사냥 2014.12.11 848
» 델파이로 만들고있는 계산기 중 모르는게 있써서 물어봄니다 [2] 초짜 2018.06.17 849
944 Firemonkey의 Webbrowser에서 로컬 Pdf 파일 읽기 [1] 슈퍼맨 2018.06.22 852
943 델파이 프로그램 배포 후 오류 [4] file gent 2019.09.17 852
942 Modbus 관련 질문 [1] 하늘산 2018.08.09 853
941 FireDAC 쿼리 사용 시 일부데이터만 가져와 FetchAll을 호출해야 전체 데이터를 가져옵니다. file 험프리 2020.09.10 853
940 카메라 컴포넌트 관련 문의드립니다. [6] 최봉원 2018.09.10 854