Keyword: if
Syntax: if $bool %line
Average Time Complexity: O(1)
Worst Case Time Complexity: O(n), where n is the number of labels created
Overview
The if keyword allows you to jump to a label or line if a condition is true. It is a core part of the ground programming language, as it would not be Turing Complete without.
Example usage
The second line checks if false is true. Obviously this is false, so nothing happens and program execution continues.
However, consider this code:
The second line checks if true is true. This is true, so the program jumps back to @label, creating an infinite loop.
A more practical example would be to repeat some code a certain amount of times, e.g. 5