Variable Arguments in Trial Definitions
Trial-oriented paradigms typically repeat one trial structure many times with only minor variations. The ERTS Script language offers an effective method of using the same trial definition with different settings by introducing the concept of variable arguments for trial commands. By replacing an argument of a trial command with a quotation mark (?) or asterisk (*), the argument becomes a variable argument which must be later specified when executing this trial.
When calling a trial schema from the session or block level, values for all variable parameters must be provided in the order they are specified in the trial definition. Variable arguments are indexed from top to bottom and from left to right.
If several variable arguments represent the same value, you may reuse a variable argument within the trial definition by referring to previous variable argument by appending a number to the '?' or '*' symbol. This number must reference the i-th variable argument in the trial definition.
Variable argument are listed in the results in their order of definition V1..Vn. By adding a label to the variable parameter you can specify the column label under which the variable values are listed. This technique also works across trials to consolidate variable parameters with the same meeting in the same column of the result file.
Example for using variable command arguments within trial definitions
TRIAL Trl1
SP ? Circle ? 1000
SP ? Circle ? 1000
SP ? Circle ? 1000
SP ? Circle ? 1000
Order of variable arguments for trial 'Trl1'
V1 V2 V3 V4 V5 V6 V7 V8
Pic PosNo Pic PosNo Pic PosNo Pic PosNo
The call
RUNTRIAL Trl1 A 1 B 2 C 3 D 4
will produce the following value insertions:
SP A Circle 1 1000
SP B Circle 2 1000
SP C Circle 3 1000
SP D Circle 4 1000
TRIAL Trl2
SP ? Circle ? ?
SP ? Circle ? *3
SP ? Circle ? *3
SP ? Circle ? *3
Order of variable arguments for trial 'Trl2'
V1 V2 V3 V4 V5 V6 V7 V8 V9
Pic PosNo Time Pic PosNo Pic PosNo Pic PosNo
The call
RUNTRIAL Trl2 A 1 500 B 2 C 3 D 4
will produce the following value insertions:
SP A Circle 1 500
SP B Circle 2 500
SP C Circle 3 500
SP D Circle 4 500
Copyright 2021 - BeriSoft Inc.
All rights reserved