up Inquisit Language Reference

expressions element

The expressions element contains custom expressions that can be used throughout the script.

Syntax

<expressions>
/ expressionname1
/ expressionname2
/ expressionname3
</expressions>

Properties

expressions.expressionname1
expressions.expressionname2
expressions.expressionname3
expressions.name
expressions.typename

Functions

None.

Remarks

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.

Examples

The following defines an expression that reflects the total score across three different conditions.

<expressions>
/ totalscore = values.congruentscore + values.incongruentscore + values.neutralscore
</expressions>

The following defines an expression the returns whether the current trial is even or odd.

<expressions>
/ isoddnumberedtrial = (mod(script.trialcount) > 0) </expressions>

Send comments on this topic:
Copyright Millisecond Software, LLC. All rights reserved.