Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Nov 23rd, 2007, 2:12 PM   #1
maikeru
Newbie
 
Join Date: Nov 2007
Posts: 2
Rep Power: 0 maikeru is on a distinguished road
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

Last edited by DaWei; Nov 23rd, 2007 at 9:12 PM. Reason: Added code tags. Moved to appropriate forum.
maikeru is offline   Reply With Quote
Old Nov 23rd, 2007, 2:23 PM   #2
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei is offline   Reply With Quote
Old Nov 23rd, 2007, 2:25 PM   #3
maikeru
Newbie
 
Join Date: Nov 2007
Posts: 2
Rep Power: 0 maikeru is on a distinguished road
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
maikeru is offline   Reply With Quote
Old Nov 23rd, 2007, 3:08 PM   #4
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
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
DaWei is offline   Reply With Quote
Old Nov 23rd, 2007, 8:31 PM   #5
null_ptr0
12 years old
 
Join Date: Nov 2007
Posts: 93
Rep Power: 1 null_ptr0 is on a distinguished road
Re: calculator clear code

why are you posting object pascal code?
null_ptr0 is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 9:04 PM.

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