[fpc-pascal] for loop variable value reliable after loop?

Dennis dec12 at avidsoft.com.hk
Mon Oct 5 16:47:19 CEST 2015

Adriaan van Os wrote:
> Sven Barth wrote:
>> The for-loop-variable contains a valid value after the loop if the 
>> loop was left using a break or goto (this does not seem to be 
>> documented in FPC's language reference guide, but AFAIK it is in 
>> Delphi; also don't know what the ISO standard says about this...).
> ISO/IEC 7185 :1990(E) says in section 6.8 .3.9 For-statements
> After a for-statement is executed, other than being left by a 
> goto-statement, the control-variable shall be undefined .
> Regards,
Thanks so much for clarification.


More information about the fpc-pascal mailing list