I am using the latest Inquisit for Mac.
I tried with no success numerous variants of expressions based on the following example in help:
/ selectionmode = sequence
/ items = [if ( floor(mod(block.test.currenttrialnumber, 2)) == 0 ) 1 else 2]
Finally I just copied the very text of the example only to discover that it would not work either! Error message:
"Expression 'floor(mod(block.test.currenttrialnumber,2' is invalid. Unmatched parenthesis."
Even a much simplified version was wrong:
/ items = [if ((2 + 2) == 4) 1 else 2]
Error: Expression '(2+2' is invalid. Unmatched parenthesis.
phrase [if (1 == 1) 1 else 2] gives: Expression '==' is invalid. Expression contains a syntax error.
same but without spaces at ==
[if (1==1) 1 else 2]
neither launches the error message nor prevents the script from running, but does not work as intended too.
What is the proper way of conditional list definition?
P.S. I would appreciate any clues as to what types of expressions / operators are allowed where. Are there any resources available? I found only a note in the help that most Java or similar conventions should feel familiar to those who know these languages, but I happen to know only old school tools: some of assembler, basic and pascal ;-)