GOSUB

Windows Linux macOS

Syntax

GOSUB <label>

Description

Causes script execution to jump immediately to the command following the label :<label>. When an EXIT command is encountered, execution will jump back to the command following the GOSUB.

GOSUB commands may be nested a maximum of 16 levels deep.

OK

Unchanged.

Example

  GOSUB sayhello
  INFO Goodbye
  EXIT
:sayhello
  INFO Hello
  EXIT

See also