User Tools

Site Tools




The GoTo command will instruct the current program to jump to a specified label. This is part of every BASIC language, but its use should be limited in an effort to adopt a structural programming paradigm.

Be especially careful when using GoTo within a GoSub or subroutine since improperly terminating a subroutine can have undesired effects.

If I = 2 Then
  Goto LAB1
End If
  I = 3

About Labels…

A label can be set with a colon (:) to specify a point for GoTo or GoSub to begin execution.


Labels cannot use reserved keywords, numbers, or include blank spaces.

The following labels are not permitted:

  Ladder:         'Reserved keyword
  123:            'Number.
  About 10:       'Blank space.

Go CUBLOC home

cubloc/goto/index.txt · Last modified: 2016/04/14 11:07 (external edit)