in reply to Re^10: UPDATED, mostly solved: separation of define + assignment different from combination?
in thread UPDATED, mostly solved: separation of define + assignment different from combination?
It looks pretty quirky for the given example, regardless of it possibly being valid if FUNC was called within the the defining local statement.
I don't see the warning is necessary for *this* example.
However, if, in a NESTED call, a "previous definition" of FUNC exists and theoretically could be called to do some function or return a value, from the "outer, non-nested iteration". In that case, the old FUNC is still around and should be usable in the assignment -- the old value of FUNC would be overwritten/redefined BEFORE the old/outer level FUNC had been completely saved off (which, I'm guessing, can't happen until the end of the 'local' statement.
Given that the call to FUNC might not be easily determined while that statement is executing, (multiple local functions could be called, with their existence dependent on external state variables), I'd say the warning is probably necessary, as proving such would seem to be NP-hard.
|
|---|