Frank Heckenbach wrote:
The Chief wrote:
... snip ...
Is there a semantic difference between:
type Int16 = Integer (16); and: type Int16 = packed -32768..32767;
That is, can the packed subrange form replace the specified-size form in all cases?
Internally, they're handled differently, so I'd have to check carefully if both yield exactly the same types in the end (but if not, it can maybe be fixed).
If so, this might justify dropping `Integer/Cardinal/Word (n)' entirely.
I like that solution. It is in the proper Pascal spirit, and not Cified. To me anything that cannot be cleanly parsed without one-char lookahead doesn't belong (with the usual 'else' proviso).
However, `Boolean (n)' cannot be done this way. It may be used for interfaces to other languages. But I'm not sure how widespread it is. Maybe we should also drop it (along with `ShortBool' etc.), and use integer types instead (and explicit `<> 0' comparisons or so) ...
What is this construct? You are aware that C99 has the _Bool reserved word, with stdbool.h to define 'bool' as _Bool, and values for true and false of 1 and 0? I think this is now a part of gcc.