When Yazoo executes a script, a little bug called the Program Counter crawls along the script line-by-line and causes each command it encounters to do its thing. This section talks about various ways of making the PC hop from one place to the next, without using functions (which are described in a later section). This is a slight digression from the logical order of topics, but it's an important one since flow control is such a basic subject.
In Yazoo scripting there are four commands for controlling the PC: if statements, for loops, and while and the related do loops. All of these are of course familiar from C and other programming languages. Technically, none of these `commands' are really fundamental operations, since the compiler expands them into longer expressions involving `gotos'. For example, an "if cond" statement translates into "if (not cond) goto endif". There is no way to script a goto directly.
Last update: July 28, 2013