Arithmetic definitions explained

<< Click to Display Table of Contents >>

Navigation:  User Guide > Project components >

Arithmetic definitions explained

An arithmetic definition has a numerical value.

An arithmetic definition is some syntax that refers to other entries and constants, for example:

"$Q1 * 7" would be 28 (4 times 7) if Q1 has a value of 4.

Arithmetic can include:

References to integer and float questions and variables

References to single-coded questions and variables

Constants with or without a decimal point

+ meaning add

- meaning minus

* meaning times

/ meaning divide

Parentheses "(" and ")" to control the order of calculation

There are some special definitions that use:

SCORE function to get the appropriate response score value for each respondent from an entry

CT function to count the number of selected responses in a multi-coded entry

MIN function to get the smallest value found in a list of other entries

MAX function to get the largest value found in a list of other entries

IMPORTANT:  there is no automatic priority for the order of calculation; it will be calculated from left to right unless parentheses are used.

For full details, see Reference Manual, Definitions, Arithmetic definitions.