GLBasic Programming/BASIC/GOTO

From Wikibooks, open books for an open world
< GLBasic Programming
Jump to: navigation, search

This is the use of GOTO:

// A GOTO sample 
beginning:
LET a=RND(600)
LET b=RND(400)
PRINT "Wow",a ,b
SHOWSCREEN
MOUSEWAIT
GOTO beginning

Eplanation[edit]

It repeats the part "beginning", so the numbers change fast.

Previous: BASIC/DO...LOOP Index Next: BASIC/Random Number Generation