NIPO ODIN Version 5.17
*RANGE
Purpose
Specifies a value range for numerical questions.
Syntax
*RANGE <[n1|expression [TO n2|expression]]>[;n3 [TO n4];...]
Description
This command specifies a range for numerical questions and numerical fields in a *FORM question. You can specify a start value and an end value for the range by separating the two values with the keyword TO . Multiple values can separated by a semicolon (; ). Instead of a value, an expression may also be used.
Remarks
You can only use an incremental range (1 TO 5 rather than 5 TO 1 ).
A semicolon must be used to separate two ranges. When using a comma, the system interprets this as a column-code reference.
The argument TO must be used to separate the extremes within a range. The dash (- ) is interpreted as a minus sign and should not be used.
Arguments
n1 The start value of the range.
n2 The end value of the range.
expression An expression of which the result will be used as the start or end value.
Example 1
*QUESTION 1 *NUMBER L2 *RANGE [ 18 TO 70 ; 99 ] How old are you?
Int.: enter "99" for no answer.
In this example, the answer can be in the range of 18 to 70 and 99.
Example 2
*QUESTION 1 *NUMBER L3 *RANGE [ -10 TO -1 ; 1 TO 10 ] Specify a number in the ranges of -10 to -1 or 1 to 10.
In this example, the answer can be in the range of -10 to -1 and 1 to 10.
Example 3
*VARS x,y *PUT x [-3] *PUT y [3]
*QUESTION 1 *NUMBER L2 *RANGE [x TO y] Specify a number in the ranges of *?x to *?y.
In this example, the answer can be in the range of -3 to 3.
|