자유롭게 질의 및 응답을 할 수 있는 게시판입니다. 개발자 여러분의 답변이 큰 도움이 됩니다. 
  • 제품설치/등록 오류 문의: 설치/등록 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 15762
공지 유용한 관련 사이트 관리자2 2014.03.20 54577
공지 본 게시판은 개발자 여러분들의 질문과 답변을 공유하는 공간입니다. 관리자 2012.01.10 97974
1373 델파이 Query.Reflesh와 DataSource.DataSet.ReFlesh의 차이점은? [1] 스카이 2018.07.31 737
1372 XE10.2 에서는 Report Tool 이 없나요? [1] midas 2018.08.06 174
1371 오라클 클라이언트를 설치하지 않고 오라클 서버에 접속 할 수 있는 방법이 없나요? [2] 맛재현 2018.07.30 452
1370 Delphi와 C++Builder를 하나의 컴퓨터에 동시에 설치할 수 있나요? [3] file 얼짱나 2018.07.30 284
1369 API 레벨 26 (안드로이드 80) 이상이 적용패치 언제 될까요 [1] silkroad99 2018.07.30 204
1368 시간 또는 분을 추가하고 싶어요. 험프리 2018.07.31 174
1367 PointMobileBI07모델 샘플자료 에러입니다. [1] 김종찬 2018.07.30 125
1366 모바일 앱개발 기술지원요청 [2] 파란김치 2018.07.25 145
1365 상위버전에서 지원하는 REST.JSON 또는 System.JSON 을 사용할 수 있을까요? [2] 도의 2018.07.27 189
1364 파이어닥 관련하여 궁금점이 있습니다. [1] 이즈로즈 2018.07.24 194
1363 RawByteString 클래스 사용이 안됩니다 [1] 손보라 2018.07.19 198
1362 델파이 도쿄버전 디자인 폼 버튼 스타일을 델파이 7으로 변경 [2] file 신우 2018.07.18 497
» 델파이로 만들고있는 계산기 중 모르는게 있써서 물어봄니다 [2] 초짜 2018.06.17 834
1360 안드로이드 앱 컴파일 시 오류 준호승호 2018.07.16 648
1359 Generator를 변수로 변경할 수있을까요? [1] 아폴로 2018.07.13 110
1358 어제부터 델파이 실행시 보안 경고 가 뜨네요 [1] file 미스터몽키 2018.07.12 520
1357 FastReport 5 설치방법 [1] 스카이 2018.07.12 1028
1356 안드로이드 앱등록을 위해선느 API레벨 8 이상을 적용해야 한다고 하는데... [3] 지병철 2018.06.27 645
1355 안드로이드 에뮬레이터 설정 방법을 문의 드립니다 [1] file 손보라 2018.07.05 1247
1354 Beacon 컴포넌트 하나로 여러개의 비콘신호를 받아오는 방법 [1] 비타 2018.06.30 468