ascot diagnostics

A1073

Error: Label ‘{label}’ is outside this procedure block, which GOTO cannot leave

A Goto inside a procedure block, Label() { }, or a $ZTRAP set there, names one of the routine’s labels outside the block, where a block’s Goto cannot jump. IRIS refuses to compile the routine (<NOLINE>); Do Label may still call the label, or the block can Quit and leave what follows to its caller.

IRIS rejects the example.

ROUTINE Demo.GotoOutOfBlock
Main(count) {
    If count < 1 Goto Empty //! A1073
    Write count, " items", !
    Quit
}
Empty
    Write "nothing to report", !
    Quit

All diagnostics