Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Understanding scope of variables
#6
Hi Boriel,

Thanks. That example makes things very clear. I think, in practice, using --explicit is a good idea to avoid most unexpected consequences. It is still important to watch out for previously defined values being picked up by subroutines, as in test2(). I guess putting function and subroutine definitions before the main program avoids that risk.

Sadly, I'm seeing an issue using --explicit with the print42 library, as I'll explain in a new thread.

Thanks again,
Reply


Messages In This Thread
Understanding scope of variables - by georgeo - 03-11-2021, 01:51 PM
RE: Understanding scope of variables - by georgeo - 03-11-2021, 11:13 PM
RE: Understanding scope of variables - by boriel - 03-12-2021, 10:32 PM
RE: Understanding scope of variables - by boriel - 03-12-2021, 10:26 PM
RE: Understanding scope of variables - by georgeo - 03-13-2021, 10:48 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)