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
Const declarations Posted by oh_aye on 9 Oct 2004 at 1:27 PM
howdo all. I have just started college and I am doing a computing course. I am using Borland Turbo Pascal V7, and I have got some homework, and one of the questions says which of the following are valid const declarations?

max := 25;
yes = 'y';
first : 'a';
BEGIN = 1;
correct = 5 OR 6;
PI = 8.12;
last = 'z';
tax_rate = 0.2

Does anybody have any clue which are valid, Im not really sure what a const declaration is, Im a total newbie. I would appreciate ne help. Cheers :)
Report
Re: Const declarations Posted by Masterijn on 9 Oct 2004 at 3:04 PM
: howdo all. I have just started college and I am doing a computing course. I am using Borland Turbo Pascal V7, and I have got some homework, and one of the questions says which of the following are valid const declarations?
:
: max := 25;
: yes = 'y';
: first : 'a';
: BEGIN = 1;
: correct = 5 OR 6;
: PI = 8.12;
: last = 'z';
: tax_rate = 0.2
:
: Does anybody have any clue which are valid, Im not really sure what a const declaration is, Im a total newbie. I would appreciate ne help. Cheers :)
:
A unit (*.pas) can have different sections like: "type", "var", and "const". Constants are declared in a const section. So you should try which of the above are valid declarations. The compiler will clearify why a certain declaration is wrong.






 

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.