[fpc-pascal] typed constants...
Jonas Maebe
jonas.maebe at elis.ugent.be
Mon Oct 23 19:34:06 CEST 2006
On 23 Oct 2006, at 19:30, Michael Van Canneyt wrote:
> "Real" constants (in the sense of 'not changing') do not need to be
> typed in
> the first place so
>
> Const
> A = 'Some String';
>
> Will do just fine.
You can also give them a type by simply adding a typecast around the
value. This can be necessary sometimes for range checking (e.g.
longint($80000000)) or for overload selection.
Jonas
More information about the fpc-pascal
mailing list