in reply to Re: Variables and Scope: The battle begins
in thread Variables and Scope: The battle begins

Thank you for the fast reply.
I think there was a slight misunderstanding in my code. The code that I posted was after I had already made the switch to checking to see if LOOP or JMP was called, then running it. In that code, there is no $jmptaken global variable anymore, it was nixed in favor of an approach that (inefficiently) worked. I am aware that it is set by the value returned in the sub, and I'm happy for it, since it means that the control variable is controlling the loop.
I did not know about passing it to the sub and was actually looking for a way to pass variable byref instead of byval, so this will be tremendously useful, thank you.
However in this particular case, it won't be, since to use this technique for this, I would have the worst of both worlds: global variables, and reparsing already parsed input. Until I can get variable scope to work for me without reparsing, I may just stick with what I have.
  • Comment on Re^2: Variables and Scope: The battle begins