NIPO ODIN Version 5.17

Previous Topic

Next Topic

Examples of Expressions

Examples of expressions are presented here. Note that expressions are always specified between square brackets. The expressions in these examples may be either assigned to a variable or applied to an *IF filter.

Expression Examples

Expression Results in

[ 100 ]

The value 100.

[ RAN 100 ]

A random between 0 and 99 inclusive.

[ Total[3] ]

The value stored in the third element of the number array TOTAL.

[ TOTAL2 * 3 + 10 ]

the value stored in the variable TOTAL2, multiplied by 3 and then increased by 10.

[ Q11,1 ]

1 if code 1 was marked in Q11, otherwise 0.

[ Q12,1,2,3 ]

1 if any of the codes 1, 2 or 3 were marked in Q12.

[ Q13 >= 18 ]

1 if the value in Q13 is equal to or larger than 18.

[ Q11,1 \ Q12,1,2,3 ]

1 if code 1 is marked in Q11 or if code 1, 2 or 3 is marked in Q12.

[ Q12,1,2,3 & Q13 >= 18 ]

1 if code 1, 2 or 3 is marked in Q12 and Q13 is equal to or larger than 18.

[ Q12 ]

The value of Q12 if Q12 is a single-coded or numerical question; the highest marked code if Q12 is a multiple-coded question.

[ Q13 = Q14 ]

1 if the (highest) value of Q13 is equal to the (highest) value of Q14

[ #(Q5 \ Q6) & Q7 = 1 ]

1 if either Q5 or Q6 does not contain a value and Q7 equals 1. The brackets are required to let the expression evaluate Q5 and Q6 first.

[ Q5 , 1 TO 3 ]

1 if any of the codes 1, 2 or 3 are marked in Q5.

[ Q5 , 1 TO 3 ; 6 TO 8]

1 if any of the codes 1, 2, 3, 6, 7, or 8 are marked in Q5.

See Also