Liberty BASIC Help Online

GOTO label
GOTO causes Liberty BASIC to proceed to the program code following the label,  using the form 'GOTO label'.  The label can be either a traditional line number or a branch label in the format [branchLabel] where the branch label name can be any upper/lowercase letter combination.  Spaces and digits are not allowed.
Here are some valid branch labels:  [mainMenu]  [enterLimits]  [repeatHere]
Here are some invalid branch labels:  [enter limits]  mainMenu  [1moreTime]
  print "Make your selection (m, r, x)."
  input selection$
  if selection$ = "M" then goto [menu]
  if selection$ = "R" then goto [repeat]
  if selection$ = "X" then goto [exit]
  goto [askAgain]
  print "Here is the main menu."
  print "Okay, bye."
  In the lines containing IF . . . THEN GOTO, the GOTO is optional.
  The expression IF . . . THEN [menu]  is just as valid as
  IF . . . THEN GOTO [menu].  But in the line GOTO [askAgain], the GOTO
  is required.
  See also GOSUB

Copyright (C) 2003 Shoptalk Systems
Liberty BASIC -