NIPO ODIN Version 5.17

*FIELD

Purpose

Defines positions of a subroutine or repeat block.

Syntax

*FIELD [pos]L<length>|<pos>

Description

This command is used with *GOSUB (jump to subroutine) and *REPEAT (repetition block) and must be specified after that command on the same line. This command defines data field in the U-file, where the entered answers of the subroutine or repetition block have to be stored. Positions within the routine or *REPEAT block are relative positions within this block.

Arguments

pos
The start of the data field where the data is written in the U-file.

length
The length of the data field.

Remarks

If you're working with unfixed data fields you don't have to specify this command. Fixing the questionnaire will place the required *FIELD commands where required.

Example 1

*TEXTVARS BRAND

*REPEAT 3 *FIELD 61L3
*REPNUM 1: *PUT BRAND "Acer"
*REPNUM 2: *PUT BRAND "IBM"
*REPNUM 3: *PUT BRAND "Tulip"

*QUESTION 2 *CODES 1L1
What do you think of the quality of *?BRAND ?

1: Very good

2: Good

3: Poor

4: Very poor


5: Don’t know \ no answer

*ENDREP

Example 2

*TEXTVARS BRAND

*SUBROUTINE BRANDSUB

*QUESTION 2 *CODES 1
What do you think of the quality of *?BRAND ?

1: Very good
2: Good
3: Poor
4: Very poor
5: Don’t know \ no answer

*QUESTION 3 *CODES 2
What do you think of the price of *?BRAND ?

1: Very expensive
2: Expensive
3: Cheap
4: Very cheap

5: Don’t know \ no answer

*ENDSUB

*QUESTION 1 *CODES 61L3 *MULTI *SAVE BRAND
Have you ever heard of the following brands of computers?

1: Acer *GOSUB BRANDSUB *FIELD 64L2
2: IBM *GOSUB BRANDSUB *FIELD 66L2
3: Tulip *GOSUB BRANDSUB *FIELD 68L2

See Also