RETURN

You can use the RETURN command to return to the program location of the last jump performed.

  Syntax
RETURN
  Returns

This command does not return a value.

  Description

In order to use the GOSUB command you must create a subroutine in your program that terminates with the RETURN command. To create a subroutine you must write a label in your program followed by a sequence of commands. The label can be made up from any combination of alphabetic characters, but you must end the declaration of the label using a colon(:). You only need to use a colon when you are declaring the label, and should not be used when calling the label from a GOSUB command.

  Example Code
PRINT "start"
GOSUB _subroutine
WAIT KEY
END
_subroutine:
PRINT "inside subroutine"
RETURN
  See also

CORE Commands Menu
Index