goTo

EGL provides a goTo statement solely for migration of older programs that use flow statements. Do not use this statement in new code. It violates structural programming principles and can cause errors that are difficult to trace.

The statement causes processing to continue at a specified label, with the following restrictions:
  • The label must be in the current block, in a block that fully contains the current block, or outside all conditional blocks at the top of the function.

You can use a goTo statement to leave a block of code, but not to go into a block of code from the outside.

Syntax


Syntax diagram for the goTo statement
label
A series of characters that mark a point where processing resumes. At the location where processing continues, the label is followed by a colon.

Compatibility

Table 1. Compatibility considerations for goTo
Platform Issue
Java generation The target label of a goTo statement must not be inside a block of code. The label must be at the top level of a function.
JavaScript generation The goTo statement is not supported.