Category:Quackery: Difference between revisions

m
tweaked text
m (corrected external link to wiki link)
m (tweaked text)
 
Line 20:
The words <code>is</code>, <code>[</code>, and <code>]</code> are builders; they can be found in the builders dictionary, which extends the functionality of <code>build</code> beyond building a flat nest for <code>do</code> to evaluate. <code>is</code> takes the item that <code>do</code> most recently added to its output nest, and adds it to the names dictionary, along with the string that follows it, "<code>quackery</code>" as its name. The syntax of Quackery is; words and numbers are sequences of printable characters, separated by spaces and carriage returns unless a builder treats the text that follows it otherwise. The builder <code>builds</code> is equivalent to <code>is</code> for adding new words and behaviours to the builders dictionary.
 
Evaluation of a nest proceeds from left to right unless a control flow operator redirects it. <code>done</code> causes <code>do</code>to stop evaluating a nest and return to the nest that pointed to it immediately, rather than at the end of the nest. <code>again</code> restarts the evaluation of that nest, non-recursively. The word <code>recurse</code> does it recursively. <code>if</code> and <code>iff</code> conditionally (depending on the item on the top of the Quackery stack) skip over the next one and two items in the nest respectively. <code>else</code> skips over one item, unconditionally. As with the other provided control flow operators, these words are nests, not operators, that make use of the "meta-control flow" operators, which grant the behaviours described above to words that use them. (They modify items on the return stack, rather than acting on the Quackery engine's various pointers registers directly, so their changes are enacted upon exiting the nest that called them.)
 
There are no variables in Quackery. Instead, there are stack management words to rearrange the uppermost items on the Quackery stack as required, and nameable ancillary stacks that fulfil the roles of variables.
1,496

edits