NIPO ODIN Version 5.17

*VARS

Purpose

Defines one or more numeric variables or arrays.

Syntax

*VARS <name>[,name2,...]

or

*VARS <name[size]>[,name2[size2],...]

Description

Defines numeric variables or one-dimensional number arrays. This command must be speciifed at the beginning of a line. Numeric variables or arrays can be used throughout the entire questionnaire to store data or retrieve data. In numeric variables or arrays all alphanumerical data can be stored. A numeric variable or array initially is empty.

Arguments

name
The name of the variable or array. Multiple variables or arrays can be created with a single *VARS command by including additional variable or array names separated by commas (name2, name3, and so on).

size
Specifies the size of the array to be created. The variable can store up to size values.

Remarks

  • NIPO ODIN has 10 system variables, 0 up to and including 9, which do not need to be defined. Contrary to all other variables in NIPO ODIN, variable 9 will not be cleared at the start of a new interview.
  • Only one-dimensional arrays are supported.

Example

*VARS GHELP,HHELP[2]
*QUESTION 1 *NUMBER 93 *SAVE GHELP
How many children, living at home, are there in this
household?

*QUESTION 2 *NUMBER 94L2 *SAVE HHELP[1]
What is the age of the oldest child?

*QUESTION 3 *NUMBER 96L2 *SAVE HHELP[2]
What is the age of the second oldest child?

*PAGE
There are *? GHELP children living at home.

The oldest is *? HHELP[1] years.
The second oldest is *? HHELP[2] years.

See Also