자유롭게 질의 및 응답을 할 수 있는 게시판입니다. 개발자 여러분의 답변이 큰 도움이 됩니다. 
  • 제품설치/등록 오류 문의: 설치/등록 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 19653
공지 유용한 관련 사이트 관리자2 2014.03.20 58603
공지 본 게시판은 개발자 여러분들의 질문과 답변을 공유하는 공간입니다. 관리자 2012.01.10 102130
959 연결프로그램 설정 방법 문의 [2] 손보라 2018.11.01 867
958 FMX 멀티스레드 문제입니다. [4] file 아크나톤 2019.08.28 867
957 FireDAC 쿼리 사용 시 일부데이터만 가져와 FetchAll을 호출해야 전체 데이터를 가져옵니다. file 험프리 2020.09.10 867
956 모바일 키보드타입 문의입니다. [1] 최민철 2014.12.29 867
955 Firemonkey의 Webbrowser에서 로컬 Pdf 파일 읽기 [1] 슈퍼맨 2018.06.22 870
954 tcxGrid 에서 Column 컬러 변경 [2] 가나다 2019.03.28 870
953 WebBrowser 샘플코드 질문입니다. ScorpioM 2015.01.15 870
952 [세미나] 기존에 모바일 개발을 위해 안드로이드와 iOS 를 각각 개발해 왔습니다. 파이어몽키에서 이 코드를 재사용할 수 있나요? [1] 관리자 2015.01.30 870
951 ListView 질문드립니다. [2] file 육식육식 2020.04.08 871
950 안드로이드 스튜디오 라이브러리파일 (AAR) 사용 방법 문의 [3] 조대현 2017.06.22 872
949 Edit창에 SelectAll 전체선택 김하나 2015.04.17 872
948 윈도우10에서 리얼그리드 셀편집시 문제 [1] file 마이다스준 2017.02.08 873
947 모바일 Android 앱에서 PC에설치된 Database 서버에 직접연결이 가능한가요?? [1] 트리야 2019.10.08 876
946 [bcc32c Error] GdiplusPath.h(146) reference to 'byte' is ambiguous [2] 하루 2019.11.15 877
945 catalina10.15.3 paserver20.0 실행에러 원인좀 알려주세요.. xe10.3 [3] 네오마스 2020.03.20 878
944 indy udp 서버로 수신한 데이터에 대한 응답을 udp로 보내는 echo 서버를 만들었는데 [2] 금목암 2019.11.15 882
» 델파이로 만들고있는 계산기 중 모르는게 있써서 물어봄니다 [2] 초짜 2018.06.17 884
942 델파이(10.4.1) ios App 전체화면 안되는 부분 질문드립니다. 쟝히 2021.03.04 884
941 앱 개발시 HTML 미리보기 [1] 사랑남 2015.02.12 885
940 C#으로 개발된 프로젝트를 델파이로 넘어가고 싶습니다. 험프리 2017.04.14 886