NIPO ODIN Version 5.17
Expression Operators
Expression operators
Operator
|
Description
|
Use
|
Note
|
Q
|
Question reference
|
Qn
|
Reference to question n or its contents
|
L
|
Length of field
|
nLm
|
Position n, length m
|
F
|
Field test
|
QxFn
|
Contents of field (cell) number n within form-question x
|
,
|
code-test
|
Qx,n
|
1 if present, otherwise 0
|
-
|
code-string
|
Qx,n-m
|
Code string
|
-
|
minus sign
|
-n
|
Negation of n
|
#
|
not
|
#Qx
|
1 if no answer in question x, otherwise 0
|
#
|
negation
|
#n
|
1 if value n not true,
otherwise 0
|
+
|
add
|
n+m
|
Sum of n and m
|
-
|
subtract
|
n-m
|
Difference of n and m
|
*
|
multiply
|
n*m
|
Product of n and m
|
/
|
divide
|
n/m
|
Division of n and m
|
&
|
logical AND
|
n&m
|
1 if both not 0, otherwise 0
|
\
|
logical OR
|
n\m
|
0 if both 0, otherwise 1
|
RAN
|
random value
|
RAN n
|
Random value from 0 up to and including n-1
|
=
|
equal to
|
n=m
|
Results in 1 if true or 0 if false
|
<
|
less than
|
n<m
|
Results in 1 if true or 0 if false
|
>
|
more than
|
n>m
|
Results in 1 if true or 0 if false
|
<=
|
less than or equal to
|
n<=m
|
Results in 1 if true or 0 if false
|
>=
|
more than or equal to
|
n>=m
|
Results in 1 if true or 0 if false
|
<>
|
not equal to
|
n<>m
|
Results in 1 if true or 0 if false
|
?R
|
repetition number
|
?R
|
current (logical) repetition number
|
?A
|
list reference in conjoint measurement
|
?A
|
feature of A-list
|
?B
|
list reference in conjoint measurement
|
?B
|
feature of B-list
|
?Y
|
Height of a picture or movie
|
?Y
|
height in pixels
|
TO
|
Range
|
n1 TO n2
|
Range n1 through n2
|
;
|
separate ranges
|
n1 TO n2 ; n3 TO n4
|
Range n1 through n2 or n3 through n4
|
QxM
|
order of mentions in a *MULTI question
|
QxM
|
|
QxR
|
display order of a question, when using *RAN , *INV or *ROT
|
QxR
|
|
QxMy
|
order of mentioning number y in a *MULTI question
|
QxMy
|
|
QxRy
|
display order Used in combination with *ORDER number y of a question, when using *RAN , *INV or *ROT
|
QxRy
|
|
Question reference
The reference to a question by means of Qn where n represents the question number. For example, Q10 references question 10. If it concerns a code test then more code values may occur; these will be treated as a logical or.
Code string
Any given number of codes separated by one or more commas or a code range indicated by a dash. Valid codes consist of the digits 0 up to and including 9, or B for a blank value. For example, Q2,B returns 1 (true) is Q2 is blank, Q3,1-5 returns 1 if in Q3 any of the codes in the range 1-5 are marked, and Q4,2,4,8,12 returns 1 if Q4 contains any of the codes 2, 4, 8, or 12 ar marked.
Values n or m
The values n or m may represent any of the following:
- Number
- Expression or variable
- Text enclosed in double quotes with, possibly, the embedded contents of a variable
Position reference
The reference to a position in the data file. Specify starting position and field length to distinguish position references from numbers. It is recommended to use question references instead of position references.
|