Syntax: GOTO Address
Jump the point in the program specified by Address.
|BS1||All BS2 Models|
|Unlimited, but good programming practices suggest minimizing the use of GOTO.|
The GOTO command makes the BASIC Stamp execute the code that starts at the specified Address location. The BASIC Stamp reads PBASIC code from left-to-right, top-to-bottom, just like in the English language. The GOTOcommand forces the BASIC Stamp to jump to another section of code.
A common use for GOTO is to create endless loops; programs that repeat a group of instructions over and over. For example:
Hello: DEBUG "Hi", CR PAUSE 500 GOTO Hello
The above code will print "Hi" on the screen, over and over again. The GOTO Hello line simply tells it to go back to the code that begins with the label Hello.
BASIC Stamp Help Version 2.5.4
Copyright © Parallax Inc.