up Inquisit Language Reference

stop attribute

The stop command specifies the conditions in which an expt or block should be terminated.

Member of

<block> <expt> <likert> <openended> <sliderTrial> <surveyPage> <trial>

Syntax

/ stop = { script }

Parameters

Name Type Description
script script Specifies the expression to evaluate to determine whether the expt or block should stop.

Remarks

The stop command enables a script to conditionally end an expt or block based on whether a logical expression is true. The expression can evaluate the subject's performance, the current state of the experiment, the elapsed time, and other variables as well. You may specify multiple expressions separated by semi-colons, or contained in separate stop commands. The stop conditions are evaluated after each trial is complete. If any single condition is true, the expt or block ends. Otherwise, the expt or block continues.

The attribute requires an explicit 'return' statement.

Examples

The following block is interrupted if the subject gives 5 incorrect answers in a row, or if mean response latency on testtrials drifts above 1000 milliseconds:

<block myBlock>
/ trials=[1-20=noreplace(testtrials, distractortrials)]
/ stop={
  return (this.errorStreak >= 5 || trial.testtrials.meanLatency >= 1000);
}
</block>

Copyright Millisecond Software, LLC. All rights reserved.