[fpc-devel] Debugging Loop Unroll Optimization
Mattias Gaertner
nc-gaertnma at netcologne.de
Fri May 18 13:46:32 CEST 2018
On Fri, 18 May 2018 13:28:30 +0200 (CEST)
marcov at stack.nl (Marco van de Voort) wrote:
>[...]
> > > "After the for statement terminates (provided this was not forced by a Break or an Exit procedure), the value of counter is undefined."
>[...]
> Well, well, clearly. One could interpret it that it says that the for
> statement terminates naturally if not forced by break or exit. It doesn't
> say what happens with break or exit.
If the value of counter is undefined no matter what, then you would
not bother writing the exception in the brackets, wouldn't you?
> The fact that this exception is not documented with an example makes it very
> ambiguous IMHO.
I found a dozen places in the VCL using this.
For Result:=...do if ... then exit;
Mattias
More information about the fpc-devel
mailing list