next up previous contents index
Next: Typed constants Up: Constants Previous: Constants

Ordinary constants

Ordinary constants declarations are no different from the TP implementation. You can only declare constants of the following types: Ordinal types, Real types, Char, and String. The following are all valid constant declarations:

Const
  e = 2.7182818;  { Real type constant. }
  a = 2;          { Integer type constant. }
  c = '4';        { Character type constant. }
  s = 'This is a constant string'; {String type constant.}
Assigning a value to a constant is not permitted. Thus, given the previous declaration, the following will result in a compiler error:
  s:='some other string';



Michael Van Canneyt
Thu Sep 10 14:02:43 CEST 1998