Navigation stuff goes here


Command groups: while

This structure is useful for repeating a series of steps until a certain condition becomes false. The while step is always found with an end while step somewhere after it. The steps between the two commands are repeated while the condition is true:

while $varLastAnswerCorrect is no … end while

The four conditions you may use are

<value1> is <value2>
<value1> is not <value2>
<value1> is in <value2>
<value1> is not in <value2>

The condition is evaluated once when PsyScript first gets to the while step, and again each time PsyScript gets to the end while step.

Commands

while condition
    …
end while

Makes PsyScript repeat the steps between the while and the associated end while until the condition becomes false. If the condition is false when the while step is first encountered, the commands in the loop are not executed even once.

while $lastAnswer is q
while I is not in $varAnswersSoFar

Technical notes

See also