bas7advr.hlp (
Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
GOTO Statement Details
◄Syntax► ◄Details► ◄Example► ◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
GOTO branches unconditionally to the specified line.
GOTO {linelabel | linenumber}
Usage Notes
■ The GOTO statement provides a way to branch unconditionally to another
line (linelabel or linenumber). A GOTO statement can branch only to
another statement at the same level of a program. You cannot use GOTO
to enter or exit a SUB, FUNCTION, or multiline DEF FN function. You
can, however, use GOTO to control program flow within any of these
program structures.
■ It is good programming practice to use structured control statements
(DO...LOOP, FOR...NEXT, IF..THEN...ELSE, SELECT CASE) instead of GOTO
statements, because a program with many GOTO statements can be
difficult to read and debug.