NIPO ODIN Version 5.17
*RANDOM
Purpose
Randomizes answer codes or repetitions.
Syntax
*RANDOM [[pos]L<length>|<pos>]
Description
This command can be used in combination with *QUESTION , *REPEAT and *FORM and must be specified after these commands on the same line. The codes and the descriptions of a question are shown in random order on the screen. Repetitions are executed in random order.
Arguments
pos The data field specification where the used order is stored in the data file with the closed answers.
length The length of the data field.
Remarks
If you use *RANDOM on a question the following applies:
- The number of codes of which the order is saved depends on the length of the data field specification. To store the entire order, this must be just as long as the number of codes to be saved multiplied by the number of digits in the highest code. The applied random order is stored in the closed answer file.
- With
*NOCON answer codes can be excluded from the randomization. - Within a
*FORM , fields are not displayed in randomized order if more than one field is used on a single row.
Example
*QUESTION 1 *CODES 61L10 *MULTI *RANDOM 71L6 What PC makes do you know?
1: Acer 2: AST 3: Compaq 4: Dell 5: Hewlett Packard 6: IBM 7: Philips 8: Tulip 9: Other *OPEN *NOCON 10: Don’t know *NMUL *NOCON
In this example, all mentions are stored in position 61L10. In the answer field 71L6 the code numbers of the first three codes displayed are stored. The last two codes are not randomized along and will be displayed always at the bottom of the list.
Example 2
*TEXTVARS who *REPEAT 5 *FIELD 86L15 *RANDOM 1L1 *REPNUM 1: *PUT who "Johnny" *REPNUM 2: *PUT who "Mary" *REPNUM 3: *PUT who "Bill" *REPNUM 4: *PUT who "Anne" *REPNUM 5: *PUT who "Joey" *QUESTION 1 *NUMBER 2L2
How old is *? who?
*ENDREP
In this example, question 1 is repeated 5 times, randomly. The answer of the questions is stored in the data field 86L15: for each question 1 position (1L1) for the order in which the question was displayed and 2 positions (2L2) for the answer. For example, the questions for Johnny are stored in positions 86L3 (86L1 the order, 87L2 the answer), for Mary in position 89L3 (89L1 the order, 90L2 the answer), et cetera.
|