Pascal

Moderators: None (Apply to moderate this forum)
Number of threads: 4095
Number of posts: 14004

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Need Help With Pascal Assignment.. Posted by PaintBrushDoom on 1 Feb 2011 at 10:17 PM
I'm very new to Pascal and I'm a bit lost. I have to write the code required to display/enter student details and marks.

I'm not sure as to how to put the code into a text so it can be read here but I can tell you that the error line is 14,9, it's an illegal expression and it reads expected ";" but WRITELN found.
Report
Re: Need Help With Pascal Assignment.. Posted by _Atex_ on 1 Feb 2011 at 10:30 PM

: I'm not sure as to how to put the code into a text so it can be read
: here but I can tell you that the error line is 14,9, it's an illegal
: expression and it reads expected ";" but WRITELN found.
:

You probably missing an ; at 14,9. It must be present at the end of each line or statement except in a few instances like: it cannot precede the else and it is optional before the end statement. If you can't find the problem feel free to post your code here.
Report
Re: Need Help With Pascal Assignment.. Posted by PaintBrushDoom on 1 Feb 2011 at 10:36 PM
I'm very new to Pascal.. how do I copy the material and paste it here?
Report
Re: Need Help With Pascal Assignment.. Posted by _Atex_ on 2 Feb 2011 at 8:51 PM
: I'm very new to Pascal.. how do I copy the material and paste it
: here?
:

Read this: http://www.programmersheaven.com/2/PH-Rendering-Guide
Report
Re: Need Help With Pascal Assignment.. Posted by PaintBrushDoom on 3 Feb 2011 at 7:44 AM
Program Student_Data;


Uses crt;


Begin
Clrscr;

Writeln; '***************************************************'

Writeln; 'School For Beginners'

Writeln; 'Oklahoma City'

Writeln; 'Oklahoma'

Writeln; 'Subject' 'Marks' 'Subject' 'Marks'

Writeln; 'English' 'Math'

Writeln; 'History' 'Science'

'Geography'
'Total Points Earned:'
'Total Points: '



Writeln; 'Do you wish to view more (Y/N)?


' ***********************************************************'

End.

Okay. I finally got it. Now the error apparently is at line 12,9. which is the line that reads

WRITELN;'School For Beginners'

The error at 12,9 is apparently an illegal expression.



Report
Re: Need Help With Pascal Assignment.. Posted by quikcarl on 3 Feb 2011 at 11:45 AM
You should use parentheses around the quoted strings. You can use Writeln by itself, but to get some information on the screen, it needs to be put together, thusly:
:         Writeln; 'School For Beginners'

       Writeln( 'School For Beginners' );

Report
Re: Need Help With Pascal Assignment.. Posted by PaintBrushDoom on 3 Feb 2011 at 1:21 PM
Another error message.

Writeln ('Oklahoma City');

Illegal Expression

Syntax error, ";" expected but identifier WRITELN found


Report
Re: Need Help With Pascal Assignment.. Posted by _Atex_ on 3 Feb 2011 at 8:12 PM
: Another error message.
:
: Writeln ('Oklahoma City');
:
: Illegal Expression
:
: Syntax error, ";" expected but identifier WRITELN found
:
:
:

You got to do some studying your own, this site has the answers to your problem: http://www.astahost.com/info.php/Pascal-Beginners-Part_t15281.html
Report
This post has been deleted. Posted by lanxiang on 16 Feb 2011 at 1:17 AM
This post has been deleted.



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.