Programming Forums

Programming Forums (http://www.programmingforums.org/forumindex.php)
-   Delphi (http://www.programmingforums.org/forum41.html)
-   -   calculator clear code (http://www.programmingforums.org/showthread.php?t=14565)

maikeru Nov 23rd, 2007 2:12 PM

calculator clear code
 
hiya this is my work for college and i have searched on the internet but it is so hard to find out this could anyone help please i am creating a calculator on lazarus i have managed to work out how to do the numbers and the clear all button but i am having problems with one thing

probally basic for most of you but i would appreciate it if anyone can help

here is the problem

i need to know how to deleat one string from my calculator number so when i click it the number will go from 4563 to 456 i have variables and i will show the code and if you need anymore code reply and i will post it because this is my first time posting

this isnt all of it but a small bit of the code i have


:

Form1: TForm1;
  Number1: char;
  Number2: char;

procedure TForm1.btn8Click(Sender: TObject);
begin
  edtaccumulate.text := edtaccumulate.text + '8'
end;

procedure TForm1.btn9Click(Sender: TObject);
begin
  edtaccumulate.text := edtaccumulate.text + '9'
end;

procedure TForm1.btnclearallClick(Sender: TObject);
begin
  edtaccumulate.text := ''
end;

procedure TForm1.btnclearClick(Sender: TObject);
begin
end;

i hope you can help

DaWei Nov 23rd, 2007 2:23 PM

Re: calculator clear code
 
One wonders how you managed to learn to put your post (unnecessarily) in bold, without learning to put the code in tags to preserve its formatting and make it stand out, or put it in the proper forum.

maikeru Nov 23rd, 2007 2:25 PM

Re: calculator clear code
 
i just clicked the bold button i am still new to programming that is why i need help i have been looking all over for ways to help so i thought i would try here would you or anyone else be able to help me

DaWei Nov 23rd, 2007 3:08 PM

Re: calculator clear code
 
Well, this looks like Pascal, which I haven't touched in a couple of decades, or Delphi. I'm not sure why you posted it in the C++ forum.

Do you not know what language you're cutting and pasting? Have you been paying any attention in your classes, or what they are purporting to teach? Would you like me to move this to another forum, where you might find someone to tutor you?

null_ptr0 Nov 23rd, 2007 8:31 PM

Re: calculator clear code
 
why are you posting object pascal code?


All times are GMT -5. The time now is 11:25 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC