Skip to main content

Labels

caution

Not all features mentioned here are implemented

Labels#

A label in Loop is like: <identifier>:, it serves as a "jump point".

The syntax for the identifier for a label is the same as a variable. Examples of labels:

// Label 1first:
// Label 2second:

Goto#

The keyword "goto" is needed to jump to a label. The syntax is as follows: goto <label>. When using a label, you need to reference a label.

if(true) {    if (true) {        // It will jump to the label: "label:"        goto label:    }    if (true) {        // This block will never be reached    }}label: