![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Newbie
Join Date: Nov 2007
Posts: 2
Rep Power: 0
![]() |
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; Last edited by DaWei; Nov 23rd, 2007 at 9:12 PM. Reason: Added code tags. Moved to appropriate forum. |
|
|
|
|
|
#2 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#3 |
|
Newbie
Join Date: Nov 2007
Posts: 2
Rep Power: 0
![]() |
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
|
|
|
|
|
|
#4 |
|
Resident Grouch
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Jun 2005
Posts: 6,453
Rep Power: 10
![]() |
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?
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code. Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers |
|
|
|
|
|
#5 |
|
11 years old
Join Date: Nov 2007
Posts: 79
Rep Power: 1
![]() |
Re: calculator clear code
why are you posting object pascal code?
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Viewing VB's Automated code | john Wesley | Visual Basic .NET | 3 | Jun 8th, 2006 5:37 AM |
| FTP and return code fetching | Serinth | C | 2 | May 28th, 2006 11:05 PM |
| Code Restructure, Finally! | OpenLoop | Show Off Your Open Source Projects | 13 | May 15th, 2006 4:56 PM |
| String to Morse Code - Copying from string to string | Xenon | C | 29 | Nov 10th, 2005 2:30 PM |
| Code Reading Tips | linuxpimp20 | Other Programming Languages | 4 | Sep 8th, 2005 3:53 PM |