자유롭게 질의 및 응답을 할 수 있는 게시판입니다. 개발자 여러분의 답변이 큰 도움이 됩니다. 
  • 제품설치/등록 오류 문의: 설치/등록 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 15761
공지 유용한 관련 사이트 관리자2 2014.03.20 54577
공지 본 게시판은 개발자 여러분들의 질문과 답변을 공유하는 공간입니다. 관리자 2012.01.10 97974
3079 Getit Package Manager에서 Fast Report VCL 설치하려는데 에러납니다 도와주세요 [2] file 왕초보 2020.10.12 214
3078 GetIt Package Manager에 등록된 컴포넌트 설치 [3] sihwan 2020.10.05 227
3077 갑자기 발생한 There is a problem with the site's security certoficate 에러 [4] file 노력하는삶 2020.10.12 286
3076 builder 10.4.1 버젼에서 생성자 함수에 fastcall 에러 sihwan 2020.10.09 259
3075 datasnap 서버프로그램에서 특정클라이언트에게만 내용을 전달할수가 있을까요 [1] 라빌레나 2020.10.02 369
3074 10.4 시드니에서 푸시가 (Android, IOS) 가 되는지요? [1] delphiman 2020.10.05 162
3073 RAD Server 라이센스 문제 [1] 옥돌 2020.10.05 155
3072 [백신관련] XE10.3 리오 백신(알약) 오탐지 관련... 크림슨킹 2020.10.01 165
3071 64bit 서비스 프로그램 개발시 빌드 불가한 현상 file SC 2020.09.29 310
3070 델파이 STMP 개발문의 [1] 동네옹 2020.09.27 229
3069 MDI프로그램에서 마우스 휠 동작시 Stack Overflow 발생 [1] nuribit 2020.09.24 301
3068 Run(F9) 실행시 XE10 툴이 메인모니터 쪽으로 이동하는 현상 [3] 지오 2015.12.24 550
3067 웹브라우저로 네이버 웨일을 사용할 수 있는 방법을 알려주세요. [1] 미스터리 2020.09.21 284
3066 [REST 웨비나] TXMLDocument를 이용해 DataSet에 넣는 작업을 코딩 없이 단순 프로퍼티 수정만으로 될 때가 올까요? 험프리 2020.09.17 207
3065 [REST 웨비나] REST API 동시 처리에 따른 DB Connection 및 트렌젝션 관리? 험프리 2020.09.17 392
3064 [REST 웨비나] REST API와 기존 SOAP와 차이점이 뭔가요? 험프리 2020.09.17 228
3063 [REST 웨비나] JWT(JSON Web Token) 을 통한 인증 방법 험프리 2020.09.17 766
3062 [REST 웨비나] Linux OS에서 RAD Server 구현 험프리 2020.09.17 178
3061 [REST 웨비나] http와 https 호출시 주의 할것은? 험프리 2020.09.17 236
3060 Class TfrxDBCrossView not found [2] 가나다 2020.09.08 157