자유롭게 질의 및 응답을 할 수 있는 게시판입니다. 개발자 여러분의 답변이 큰 도움이 됩니다. 
  • 제품설치/등록 오류 문의: 설치/등록 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 15767
공지 유용한 관련 사이트 관리자2 2014.03.20 54580
공지 본 게시판은 개발자 여러분들의 질문과 답변을 공유하는 공간입니다. 관리자 2012.01.10 97986
3259 Socket 에러 secret dreamingguy 2012.08.17 4
3258 Windows7 Pro BDS2006 설치 실행시 오류 [1] secret 푸른숲속 2012.08.17 4
3257 HTML5 빌더에 대해 문의드립니다. secret cyner 2012.09.20 4
3256 델파이XE3에서 FireMonkey TWebBrowser컴포넌트 관련해서 문의드립니다. [2] secret 최은우 2012.11.21 4
3255 TPopupActionBar.AutoHotKeys [1] secret Feelple(고재철) 2012.12.24 4
3254 XE3 TMemo 버그 secret Feelple(고재철) 2013.01.01 4
3253 ibxpress200 [1] secret 김상훈 2015.09.09 4
3252 interbase 사용자 또는 비밀번호 알수있는 방법 있나요? [1] secret 푸르름 2016.05.04 4
3251 delphi10 dll 호출시 오류 [1] secret 홍홍홍 2015.12.27 4
3250 라이센스 확인 부탁드립니다. [1] secret 우정 2015.12.02 4
3249 컴포넌트 문의 드립니다. [1] secret sue 2015.12.11 4
3248 DB Express관련입니다 [1] secret 호로록 2015.12.11 4
3247 [xe7] 간단한 질문 몇가지 입니다. [1] secret hims 2014.11.18 4
3246 [한미반도체] XE6 Migration 관련 문의 [1] secret 키루루 2014.07.24 5
3245 RAD STUDIO XE6 에서 Cport 3.1버전 [1] secret 빛찬 2014.07.23 5
3244 [한미반도체] 64비트 마이그레이션 중 문의 secret 키루루 2014.08.11 5
3243 제품 등록 않됩니다. [1] secret barcode0 2014.10.30 5
3242 XE3 TEE CHART 에러 발생 secret 수정아빠 2015.05.22 5
3241 문의 좀 드립니다. [2] secret 하동용이 2015.12.18 5
3240 Datasnap 외부 IP로 접속? [2] secret 불나방 2014.10.31 6