RETURN

RETURN

ENDS A SUBROUTINE

  • Type: Command
  • Parameter: 0
  • Group: Reference

ACTION

The command makes subroutine execution return to the command immediately after the calling GOSUB in the main program, or makes the main program waiting an event if the subroutine was the process of an event (Not called by GOSUB in The case).

The command is used to end a subroutine.

A subroutine is a group of commands which begins by a LABEL and ends with RETURN and which can be processed a certain number of times.

SYNTAX: RETURN

USE

  • The command RETURN is used to end a subroutine (called by the main program or by an event)

ERROR

  • None.

EXAMPLE

dim a,b

label addition

a=1:b=1

gosub addition

end

addition:

print a+b

return

SEE ALSO

GOSUB