for-loops and subrange types

Phil Nelson phil at
Fri Apr 26 21:33:52 CEST 2013

On Friday 26 April 2013 12:01:34 pm Jonas Maebe wrote:
> Can anyone here offer some insights regarding the standard conformance of the test program submitted at ? (range.p)
> Both FPC and GPC cause the program to abort with a range check error, while the submitter is of the opinion that the for-loop should merely short-circuit and never executed instead.

This program is clearly how I expect pascal to work.   If the
initial value is already past the final value, it should just
do nothing.

I can't speak directly to the standards, but if the require this
to be a range error, the standards clearly broke many of my
pascal programs.

I also verified that a very old version of gcp (2.95.3) did not
cause a range error on this kind of construct.


Phil Nelson (phil at
NetBSD:  Coda:

More information about the Gpc mailing list