Frank Heckenbach wrote:
Eike Lange wrote:
Frank D. Engel, Jr. wrote:
... snip ...
If I were writing a Pascal compiler, I would be tempted to make some of these identifiers into keywords, for this very reason. Of course, then I would not meet the Pascal standards...
Well, I wouldn't try this. We have enough problems with actual keywords from different standards/dialects (most prominently proably `value' which is a keyword in EP, but is often used as an identifier otherwise).
And if you think noone would ever want to redefine `Integer' ... well, for very strict BP compatiblity we even have to do this (define it as a 16 bit type, though only in the `System' unit with a special conditional) ...
Since 'integer' is pre-defined in the encompassing level 0 block (outside the global declarations) it is perfectly legal to redefine it. Thus if you want to ensure your code ports to a 16 bit system you might write:
PROGRAM whatever(...);
CONST maxint = 32767; (* redefine *) minint = -32768;
TYPE integer = minint .. maxint; (* redefine *) ...
and away you go! These are NOT reserved words.