CBFalconer wrote:
Waldek Hebisch wrote:
Adriaan van Os wrote:
GPC accepts:
var i: integer value not 0;
There is a use for this extension; it is not expressible in Pascal.
but it doesn't accept:
var w: word value not 0;
But not for this, as it is expressable as 1 .. maxint;
I think there's a misunderstanding here. `value' (Extended Pascal) means the initial value, not a range restriction. And `not' (in this context, from Borland Pascal) means bitwise not, rather than set complement or whatever you might have thought of. Apart from that, it should be something like `MaxWord' isntead of `MaxInt' (GPC doesn't actually have `MaxWord', but the more general `High (TypeName)', BTW). Or did you really mean MaxInt only? If so, this might explain some of our differences WRT unsigned types recently. The point of using unsigned types is usually not to disallow negative values (where a proper integer subrange such as `0 .. MaxInt' would do well), but to have a bigger positive range. Frank -- Frank Heckenbach, frank@g-n-u.de, http://fjf.gnu.de/, 7977168E GPC To-Do list, latest features, fixed bugs: http://www.gnu-pascal.de/todo.html NEW! GPC download signing key: ACB3 79B2 7EB2 B7A7 EFDE D101 CD02 4C9D 0FE0 E5E8