The only
variables are OUTPUT (the return value of the procedure) and CELL(
i) (an unbounded sequence of natural-number variables, indexed by constants, as in the
Unlimited Register Machine). The only
operators are ⇐ (
assignment), + (addition), × (multiplication), < (less-than), > (greater-than) and = (equals). Each program uses only a finite number of cells, but the numbers in the cells can be arbitrarily large. Data structures such as lists or stacks can be handled by interpreting the number in a cell in specific ways, that is, by
Gödel numbering the possible structures. Control flow constructs include bounded loops,
conditional statements, ABORT jumps out of loops, and QUIT jumps out of blocks. BlooP does not permit recursion, unrestricted jumps, or anything else that would have the same effect as the unbounded loops of FlooP. Named procedures can be defined, but these can call only previously defined procedures.
Factorial function Subtraction function This is not a built-in operation and (being defined on natural numbers) never gives a negative result (e.g. 2 − 3 := 0). Note that OUTPUT starts at 0, like all the CELLs, and therefore requires no initialization. ==FlooP example==