The Freya Programming Language

Goto statements

See also

The goto statement interrupts the normal execution flow and jumps to a previously marked label inside the same method.

Syntax

A goto statement must reference a label identifier attached to some statement in the current method:

    goto label-identifier;
    ... 

label-identifier :
    statements

The label identifier must be located before the point you want to jump to, and it must be followed by a colon. There are several rules for placing a label identifier:

See also

The Freya Programming Language
Statements
yield statements
loop statements
Expressions