Const declarations

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

  • : 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.

Howdy, Stranger!

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

Categories

In this Discussion