GO TO

BASin

GO TO

Statement/Command

GO TO Makes a program branch to a particular line.

How to use GO TO

GO TO may be used as a direct command to run a program from a given line number without first clearing the screen. It may also be used to form a statement in a program. GO TO is followed by a numeric value, for example

60 GO TO 350

On execution the value following GO TO is rounded to the nearest integer and the program branches to the line number having this value. The use of a variable or expression allows the program to branch to a calculated line number. Note that if the line does not exist, then the program branches and continues with the first statement that is then encountered.

Format

  • GO TO int-num-expr

See also

Chapter 2.