Inquisit Language Reference
The expressions element contains custom expressions that can be used throughout the script.
Sometimes a script may use long and complicated expressions, or reuse a given expression in a number of places. The expression element allows you to define such expressions and assign them a name. You can then conveniently refer to the expression by its name wherever it is used in the script. Expressions are dynamically evaluated each time they are used so that they always reflect up to date values. Expressions may include other expressions defined, although you should avoid circular references.
The following defines an expression that reflects the total score across three different conditions.
/ totalscore = values.congruentscore + values.incongruentscore + values.neutralscore
The following defines an expression the returns whether the current trial is even or odd.
/ isoddnumberedtrial = (mod(script.trialcount) > 0) </expressions>