Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Const declarations

oh_ayeoh_aye Posts: 1Member
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 :)

Comments

  • MasterijnMasterijn Posts: 188Member
    : 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.



Sign In or Register to comment.