Clear questions and runnable code
get the best and fastest answer
Re: How does 'goto LABEL' search for its label?by LanX (Canon)
|on Jan 16, 2013 at 16:26 UTC||Need Help??|
Do you have a clear definition for "construct"?
I think in this context it's supposed to mean "block of a loop".
IMHO this discussion helps: cross scope gotos?
From what I remember labels are only visible from the actual "frame" and parent frames.
Frames are constructs which need an initialization like subs or for-each-loops (remember the aliased loop-var!).
That means you can't jump into these constructs and bypass initialization.
But if you call another sub from within such a frame, that means after run-time initialization, you can goto back.
So lables are a run-time thing. They belong to the dynamic scope like localized vars.
EDIT: I think the deprecation is supposed to disallow jumps into other kinds of loops like while¹ or c-style fors , which have a "logical" but no "physical" initialization like frames.
¹) remember that naked blocks are internally just while-loops