Skip to content

Instruction 1000 LABEL

HoverCatz edited this page Feb 21, 2024 · 1 revision

A label is a position in the code within a function where we can jump to. It also helps define line number positions.

Example:

	JUMP LABEL_1 >----------------|
LABEL_0:                              |
	STRING 'Hello :)'             |
	OUT -- print the text above   |
	RETURN                        |
LABEL_1: <----------------------------|
	STRING 'owo'
	OUT -- print owo
	RETURN

In the example above, we immediately jump to the last label, skipping over printing 'Hello :)' and printing 'owo' instead.

Clone this wiki locally