The quit attribute specifies the conditions under which the script should terminate.
<block> <expt> <likert> <openended> <sliderTrial> <survey> <surveyPage> <trial>
Name | Type | Description |
---|---|---|
script | script | An expression that returns boolean true or false. See help with expression syntax for more information. |
At the end of a expt, the expression specified by the quit parameter is evaluated, and if returns a true or non-zero value, the script terminates.
Requires an explicit 'return' statement.
The following script quits when performance rises above a threshold:
<block myBlock>
/ trials=[1-100=test]
/ quit={ return values.points > values.maxpoints;}
</block>