I'd like to ask a couple of questions.
If I've created a SRT section (subroutine) and I've used a label within it, can I use the same label outside of the subroutine too?
Variables created within a subroutine - are they only within the scope of the subroutine or outside the subroutine too?
Frank
Few Questions on Scope
Moderators: JRL, Dorian (MJT support)
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
By default all variables have global scope. If you want variables within subroutines to have local scope (scope only within that subroutine) then set LOCALVARS to 1.
See the section the help file cunningly titled "Scope":
http://www.mjtnet.com/OnlineHelp/scope.htm
See the section the help file cunningly titled "Scope":
http://www.mjtnet.com/OnlineHelp/scope.htm
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Scope in Macro Scheduler refers only to variables.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?