Programs start with two opening angle brackets (<<) and end with two closing angle brackets (>>). Elements of a program can be of any type including other programs. Elements are separated by spaces.
Examples: << 2 * >>, << << 2 * >> << 3 * >> ifte >>
You can store a program in a variable and execute it by typing the name of the variable without the single quotes.
You can use the following programming structures in programs:
->Create local variables and use them in the following program
Usage:obj1 obj2 ... objn -> v1 v2 ... vn << ... >>
do-until-endIndefinite loop that gets executed at least once
Usage:do commands until condition end
for-nextDefinite loop incremented by one
Usage:begin end for index commands next
for-stepDefinite loop with a specified increment
Usage:begin end for index commands increment step
Usage:if condition then true-commands end
if condition then true-commands else false-commands end
iferr-then-[else]-endError trapping conditional structure
Usage:iferr commands then error-commands end
iferr commands then error-commands else no-error-commands end
start-nextDefinite loop that gets executed at least once and is incremented by one
Usage:begin end start commands next
start-stepDefinite loop with a specified increment that gets executed at least once
Usage:begin end start commands increment step
Usage:while condition repeat commands end
Do not use i (square-root of negative one) or any other built-in command for local variables or loop indices.