자유롭게 질의 및 응답을 할 수 있는 게시판입니다. 개발자 여러분의 답변이 큰 도움이 됩니다. 
  • 제품설치/등록 오류 문의: 설치/등록 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 15766
공지 유용한 관련 사이트 관리자2 2014.03.20 54580
공지 본 게시판은 개발자 여러분들의 질문과 답변을 공유하는 공간입니다. 관리자 2012.01.10 97983
3179 C++ 빌더 10.4 Data Base Form에 Data Base Component들이 안보임 [2] file 꼬꼬마 2021.03.11 160
3178 connection editer 희망나라 2021.03.12 109
3177 10.4.2 인스톨후 안드로이드 11 SDK문제 [2] 불나방 2021.03.10 385
3176 child form 에서 mdi form 의 버튼 클릭 이벤트 [1] 가나다 2021.03.12 239
3175 안드로이드 업데이트 이후 [3] file 지구수비방위대 2021.02.17 1066
3174 TListBox 내 TListItem 삭제 [2] 공수래 2021.03.10 158
3173 Interbase System Encryption password needed [1] 임종범 2021.03.10 341
3172 sqlite [1] 희망나라 2021.03.10 450
3171 델파이 MDI 폼에서 쪽지 알람 기능 가능? [1] 가나다 2021.03.10 335
3170 아파치 RAD Server 연동 날개 2021.03.11 87
3169 error - can't bind address: Address already in use. [2] file 그아이네 2021.02.23 185
3168 [질문] 동적 생성된 버튼 객체의 해제 유무 [2] 공수래 2021.03.05 161
3167 [질문] TEdgeBrowser 에서 새창 크기 문제 [1] 겨울아이 2021.02.10 398
3166 델파이(10.4.1) ios App 전체화면 안되는 부분 질문드립니다. 쟝히 2021.03.04 868
3165 c++ buider 10.4.2 버젼 설치하고 테스트 [2] sihwan 2021.02.25 450
3164 JSON 통신시 한글 꺠짐 [1] 똘귀아빠 2021.02.24 370
3163 lambda expression 내에서 parameter의 property에 쓰기시 this 가 암묵적 capture 가 되는 문제 [2] 아루스 2021.02.04 1904
3162 FireDAC Connection 체크를 어떤 방식으로 하는게 좋을까요? [1] 육식육식 2021.02.22 305
3161 10.1 Berlin VCL Appearance 변경 시 프로그램 프리징 현상 [1] file 생각 2021.02.25 165
3160 [질문] DataSnap과 Mobile 연결 [2] 오는새벽 2021.02.25 342