Subscripts and Goto Places.
BlitzPlus Forums/BlitzPlus Beginners Area/Subscripts and Goto Places.
| ||
I was wondering if there was such thing as Subroutines, or subs, like there are in VBS, like: Sub DisplaySplashScreen() Blah Bla Blah End Sub Or if there's Goto :Something like there is in command prompt. So far I have found nothing on this, and I would really appreciate a response. Thanks! |
| ||
Gosub and Goto both exist but are both considered extremely poor style and not recommended for actual use (see the active thread in the BlitzPlus Programming board for reasoning). Gosub does not work like VB's Sub, it is less useful (in fact, it has nothing to do with what you're asking for at all, but I mention it so you aren't confused by the different meaning of "subroutine" in BlitzPlus). You're actually just looking for "Function": Blitz uses "Function" to refer to both value-returning functions and also subroutines - there's actually no distinction in this language. All procedures return a value, you can just choose to ignore it. |