Goto and Labels

Goto and labels are used to jump through the code.

Table of Contents
  1. Goto
    1. Goto - Definition and Usage
    2. Goto - Syntax
    3. Goto - Fields
    4. Goto - More Examples
  2. Labels
    1. Labels - Definition and Usage
    2. Labels - Syntax
    3. Labels - Fields

Goto

Skip the next line:

	if color down else down goto skip
	write black exit
skip:	write white

Goto - Definition and Usage

The goto function jumps to the specified label.

Goto - Syntax

goto label

Goto - Fields

Field Description
goto Required. goto.
label Required. A defined label.

Goto - More Examples

Jump to the previous line:

back:	if white exit 1 else right
	if white exit else right goto back

Labels

Explain a line:

find_white:	while color right

Labels - Definition and Usage

A label allows you to jump to a line.

Labels - Syntax

label:

Labels - Fields

Field Description
label Required. A unique label.