NIPO ODIN Version 5.17
*NUMBER (in *FORM question)
Purpose
Defines a numerical field in a *FORM question.
Syntax
*NUMBER [pos]L<length>[.fraction]|<pos>
Description
This command is always used in a *FORM question. Defines a field that expects a number as an answer. Several fields may be specified in the same *FORM question. The answer is right-aligned with leading zeros in the answer field. The answer can consist of an integer or a floating-point value, as defined in the data field specification. The decimal character is not stored in the date field.
Arguments
pos The data field specification where the given answers is stored in the data file with the closed answers.
length The length of the data field. The length of the data field defines the number of digits of the maximum value of the question. In case of a floating point value, the length of the data field is length+fraction.
fraction The number of decimals that is allowed to be entered in a floating-point value. The fraction is stored in the data field without the decimal separator. Which separator (point or comma) is to be used by the interviewer or respondent depends on the regional configuration settings.
Remarks
- The answer is right-aligned and stored with leading zeros in the answer field.
- The answer can consist of an integer or a floating-point value, as defined in the data field specification.
- The decimal point in the syntax is never stored in the answer record.
- The maximum value can be set with the
*MAX or *RANGE command, but is also limited by the number of positions in the data field. - The minimum value can be set with the
*MIN or *RANGE command. - Negative values can only be entered when the
*MIN or *RANGE command is defined with a negative value. - Negative values are stored with a preceding minus sign in the data file. Note that you may require an extra position in the field definition.
- Positive values are stored without sign.
Example
*TAB 50, 60 *QUESTION 1 *FORM *BUT 99 "Don't know" What percentage of your income do you spend on ...
1:Regular expenses (rent, heating, etc) *NUMBER 61L3.1 *MAX 100 %| 2:Clothing *NUMBER 65L3.1 *MAX 100 % 3:Food *NUMBER 69L3.1 *MAX 100 % 4:Going out *NUMBER 73L3.1 *MAX 100 %
*QUESTION 2 *CODES 77L1 *IF [Q1F1 + Q1F2 + Q1F3 + Q1F4 <> 100] The sum of all 4 fields may not add up over 100%
1: go back and correct *BACK 1
In this example, you can enter four values with one decimal each. The OK button is enabled after all fields are entered and match the criterion *MAX 100 . Question 2 checks the sum of the values.
The Don't know button is enabled until all fields are completed. If the Don't know button is pressed, the first field of the *FORM question contains the value 99 (the value 0990 is stored in position 61-64).
Result:
|