Avisaro Online Documentation - Wiki
Impressum Kontakt Sitemap

GOTO

Description

The GOTO statement is BASIC's unconditional jump instruction. GOTO, followed by a label name, jumps to that label and execution of the program continues from the first statement after the label.

Example

This little example demonstrates unconditional jumps with GOTO statements

outmode -2
goto lab1
lab2:
print "world"
end
lab1:
print "hello"
goto lab2

Remarks

In many programming languages, although they have GOTO, unconditional jumps are concidered harmful. This might be true for very large programs, but the Avisaro Scripting Language is for relatively small programs. So, it's unlikely that you get into trouble by using GOTO.