User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Pascal and Delphi section within the Software Development category of DaniWeb, a massive community of 397,859 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,420 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Pascal and Delphi advertiser:
Views: 5816 | Replies: 62
Reply
Join Date: Nov 2007
Posts: 44
Reputation: Gotovina7 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
Gotovina7 Gotovina7 is offline Offline
Light Poster

Re: Pascal calculator program

  #61  
Nov 29th, 2007
I think it would be easiest to use an array of chars. Say this for example (if it works)

Var
     myEquation      : array[1..256] of char;
     Equ                 : string[255];
     my_file            :text;

BEGIN

assign(my_file, 'input.txt');
reset(my_file);
read(my_file, Equ);
myEquation := Equ

Writeln(myEquation[1..10])

not sure if this helps at all, but that would atleast put my equation into the array and display the equation (had the writeln to make sure the equation was in the array)
Last edited by Gotovina7 : Nov 29th, 2007 at 8:47 pm.
Reply With Quote  
Join Date: Nov 2007
Posts: 44
Reputation: Gotovina7 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
Gotovina7 Gotovina7 is offline Offline
Light Poster

Re: Pascal calculator program

  #62  
Nov 29th, 2007
Hey man, I totally appreciate all the help you've given me during this massive thread (and I have learnt stuff). But this assignment is due tomorrow, so I am just going to throw together what I have and hope for the best.

THe next assignment I have is the same concept but I am suppose to use linked lists as the main storage of the equation (records and arrays are allowed)
Reply With Quote  
Join Date: Oct 2007
Location: Cherry Hill, NJ
Posts: 1,825
Reputation: Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold Duoas is a splendid one to behold 
Rep Power: 11
Solved Threads: 187
Featured Poster
Duoas's Avatar
Duoas Duoas is offline Offline
Posting Virtuoso

Re: Pascal calculator program

  #63  
Nov 30th, 2007
Ah well, sorry I didn't see this sooner. If it is due today then there's not much more to do here.

If all you wanted to do was store your equation as a string (an array of characters), then we've gone in loops for the wrong assignment.

All the stuff you've done helps, and will help you in your next assignment especially...
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

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

 

DaniWeb Pascal and Delphi Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Pascal and Delphi Forum

All times are GMT -4. The time now is 8:36 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC