Goto statements were first used for loops; try out the example code below. And we'll also show you the output.
Copy and paste this program into Small Basic:
' Uses the Goto keyword to create a loop
x = 1
Start: ' A label named Start marks this line of the progarm
x = x + 1
If (x <= 5) Then
You can create loops this way, but most programmers don’t. Small Basic has two statements (For and While) that you’ll use for loops instead.
Small and Basically yours,
- Majed Marji & Ninja Ed