Go to the first, previous, next, last section, table of contents.


control structure overview

Most of the words documented in this section do not actually correspond directly to Muq bytecode primitives; Instead, they are essentially directives to the muf compiler to alter the normal sequential flow of control in various ways, which it does by synthesizing patterns of simpler bytecode primitives.

It is traditional in Forth to allow the programmer great flexibility, up to and including defining new control structures and crashing the interpreter. As a multi-user system, Muq cannot allow users to crash the interpreter, but it does allow users to define new control structures. This isn't currently (version -1.0.0) documented or fully finalized; someone remind Cynbe to do so, sometime.

Muq muf uses curly braces to delimit the scope of control structures, somewhat as C does:

do{ ... }

Since muf, unlike C, breaks source code up into tokens simply based on whitespace, the presence or absence of a blank is very significant in muf: The above example is not equivalent to

do { ... }


Go to the first, previous, next, last section, table of contents.