Re: [U2] BASIC code - upper, lower, CamelCase, what say you?
Bobby Worley <[email protected]>
| Newsgroups | gmane.comp.db.u2.general |
|---|---|
| Message-ID | <CAG3oQnyH8zB70=u6gEEc+WDkQF2QW=-1OXmem5jZEuKcKajQeA@mail.gmail.com> |
This is really what got my thought-process flowing on this subject. I saw
this code on github after the Rocket Software "Whats New in 11.2" webinar:
https://github.com/RocketSoftware/u2-servers-lab/blob/master/UniVerse-11.2/Local/BP/LocalMain
PROGRAM LocalMain
** Let's have a quick look at local scoping
CRT "Calling the local SUBROUTINE"
CALL Main(@SENTENCE) ;* This will call Main() below, rather than
an external subroutine
CRT "Back from the local SUBROUTINE"
END
SUBROUTINE Main(Args)
CRT "Running inside the local SUBROUTINE"
CRT "Args:" :Args
FOR Counter = 1 TO 3
CALL InnerLoop(Counter)
NEXT Counter
RETURN
SUBROUTINE InnerLoop(OutsideCounter)
* Notice this won't affect Main()'s 'Counter' variable due to scoping
FOR Counter = 1 TO OutsideCounter
CRT "*":
NEXT Counter
CRT
RETURN
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users