On 12/18/2015 06:16 AM, R. Diez wrote:
[...]
> "for loop variable value reliable after loop?"
> http://lists.freepascal.org/pipermail/fpc-pascal/2015-October/045446.html
> [...]
> language behaviour that may be unexpected if you are used to
> e.g. C, but that is considered normal in Pascal
> (the above behaviour was already
> defined in the Extended Pascal standard in 1990/1991:
> http://www.pascal-central.com/docs/iso10206.pdf , Section 6.9.3.9.1 on
I find that kind of answer disappointing. In this particular case, the
FreePascal developers could have just provided that guarantee.
not really... backwards compatibility and all that... borland's TP and BP do the
same... at least back as far as v6... i can't get to my v5 or v3 to test but i
daresay that they, too, do the same... looking forward from them, i would hazard
a guess that delphi also does the same...
but then again, perhaps the devs could provide that guarantee in one of the
available language modes... perhaps with an additional mode switch...
Is there at least a compilation warning if you access the variable after the
loop?
i would expect not unless maybe with the above mentioned languages modes and
mode switches... but they don't exist for this situation, AFAIK...
--
NOTE: No off-list assistance is given without prior approval.
*Please keep mailing list traffic on the list* unless
private contact is specifically requested and granted.
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal