자유롭게 질의 및 응답을 할 수 있는 게시판입니다. 개발자 여러분의 답변이 큰 도움이 됩니다. 
  • 제품설치/등록 오류 문의: 설치/등록 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 15634
공지 유용한 관련 사이트 관리자2 2014.03.20 54464
공지 본 게시판은 개발자 여러분들의 질문과 답변을 공유하는 공간입니다. 관리자 2012.01.10 97828
999 sqlite DB에 POST하면 에러(database is locked)가 발생합니다. [2] 스카이 2018.06.14 1828
» 델파이로 만들고있는 계산기 중 모르는게 있써서 물어봄니다 [2] 초짜 2018.06.17 820
997 델파이 5.0 스페인어 Richtext box 깨어지는 문제해결 방법? [1] file 여호수아 2018.06.19 140
996 tokyo 10.2 indy udp 관련 문의 [1] goinma 2018.06.20 340
995 델파이 10.1 안드로이드용 앱푸시 알림관련 문의 경일 2018.06.22 229
994 디버그 오류 [1] 개미 2018.06.22 414
993 Firemonkey의 Webbrowser에서 로컬 Pdf 파일 읽기 [1] 슈퍼맨 2018.06.22 844
992 델파이 설치 에러 [1] file 건들다맞지 2018.06.26 424
991 컴포넌트 사용시 아이콘 표시 안보임 [1] file 건들다맞지 2018.06.27 361
990 안드로이드 앱등록을 위해선느 API레벨 8 이상을 적용해야 한다고 하는데... [3] 지병철 2018.06.27 644
989 Beacon 컴포넌트 하나로 여러개의 비콘신호를 받아오는 방법 [1] 비타 2018.06.30 467
988 10.2.3 폼디자인 델 7 처럼 변경? [4] midas 2018.07.02 319
987 영상 녹화 및 캡쳐 - OpenCV 설치?? [1] file midas 2018.07.03 698
986 안드로이드 에뮬레이터 설정 방법을 문의 드립니다 [1] file 손보라 2018.07.05 1244
985 FastReport 5 설치방법 [1] 스카이 2018.07.12 1024
984 어제부터 델파이 실행시 보안 경고 가 뜨네요 [1] file 미스터몽키 2018.07.12 518
983 bcdfield 관련 마이그레이션 작업 문의 [3] mckim 2018.07.13 348
982 Generator를 변수로 변경할 수있을까요? [1] 아폴로 2018.07.13 109
981 안드로이드 앱 컴파일 시 오류 준호승호 2018.07.16 646
980 알람앱 만들기 질문드립니다. [2] 루피 2018.07.17 331