자유롭게 질의 및 응답을 할 수 있는 게시판입니다. 개발자 여러분의 답변이 큰 도움이 됩니다. 
  • 제품설치/등록 오류 문의: 설치/등록 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 97985
3259 Delphi 에서 NI scope 사용하기 양현숙 2012.03.09 5701
3258 XE2에서 FireMonkey인지 여부 판단 [1] 현자아빠 2012.03.13 6393
3257 XE2 이전버전에 비해서 좋아진 점은 무엇인가요??? [1] 델π 2012.03.19 5838
3256 RadPHP에서 질문 [3] 초딩개발자 2012.03.21 5764
3255 BDE -> DBExpress 변경중 에러 [2] 호달 2012.03.22 8727
3254 [질문] 문자열에 관한 두가지 질문 입니다... [2] 따라쟁이 2012.03.22 5199
3253 DB Express 를 이용한 방법 도움 요청 [1] file 준이킴 2012.03.22 5898
3252 델파이 관련해서 질문드려요 ~ [1] 구군v 2012.03.23 4866
3251 RAD XE2의 TChart 컴포넌트에서요 [1] 나도몰라 2012.03.26 6038
3250 DataSnap에서 암호화, 압축을 지원하나요? 관리자 2012.03.27 6351
3249 DBExpress 질문 입니다. [3] 호달 2012.03.28 6839
3248 DBgrid 버그인지 확인 부탁드립니다. file 준이킴 2012.03.28 4890
3247 아래 DBGrid 버그 문제 일정한 규칙이 있습니다. 준이킴 2012.03.28 5055
3246 RadPHP XE2 한글문제.. [5] file netmast 2012.03.29 6909
3245 DBGrid 버그 원인 찾았습니다. ^^ 버그 맞습니다. [1] 준이킴 2012.03.29 5597
3244 프로젝트옵션의 어플리케이션 아이콘 변경 방법 ? [2] file 준이킴 2012.03.29 13841
3243 DataSnap Server 사용시 msvcr80.dll 오류 [2] file 이치고 2012.03.31 13905
3242 다른언어의 도움말 사용 [2] 나도몰라 2012.03.31 10205
3241 MAC OSX 에서 Firemonkey SaveDialog 오류 (내용수정) [3] c2design 2012.04.02 12056
3240 TTouchKeyboard 질문입니다. [2] 나도몰라 2012.04.04 9776