Declaring Local and Global in a function

BlitzMax Forums/BlitzMax Programming/Declaring Local and Global in a function

Function within a Function is a valid construct in BM.
Absolutely, the code I posted at the top works fine. It's a very useful facility to avoid huge amounts of inlining in some cases.

The only thing you have to take care of is that even a function within a function is its own variable space and only knows of application / module globals and stuff it was given on calling.
AND as I proved above it knows of globals within the parent function, but not locals within the parent function.