On Fri, Oct 15, 2004 at 02:52:33AM -0400, 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;
You seem to have misunderstood the construction. Extended Pascal "<type> value <constant>" denotes a type which is the same as <type>, except that variables of the new type are initialized to <constant>. Here, the constant expression is "not 0", which is a BP extension denoting the bitwise complement of 0. It has nothing to do with excluding 0 from the range of the type.
Emil