Procedural Statements

ScoreFile supports simple loop constructs, boolean expressions, and conditional statements. These are legal in both the header and the body of the scorefile. These constructs are:

if (<boolean expression>) { <anything> }

else if { <anything> } /* optional */

else { <anything> }    /* optional */

repeat <integer expression> { <anything> }

while (<boolean expression>) { <anything> }

do {
<anything> }
while (<boolean
expression>);

Note that in all cases, the braces and parenthesis are not optional. Also, if you are using included files, the start and end of the loop or conditional block must be in the same file.

Example 7-1. repeating block

repeat 3 { t +.1
          if (t > 3) {aPart (2) keyNum:c4k;}
          else          {bPart (1) keyNum:c2k;}
}