NIPO ODIN Version 5.17
*?
Purpose
Retrieves the contents of a variable or array as text.
Syntax
*? <var | n | expression | var[n|expression] >
Description
The contents of a variable or array are retrieved and put in place of the command and will be processed as text. This command may occur at any place where text may occur.
Arguments
var This is the name of the variable from which the contents are retrieved.
n|expression This is a positive integer from 0 up to and including 9 or an expression that has a result 0 up to and including 9, which indicates a system variable.
var[n|expression] When an array-variable is used, this the name of a variable followed by (between square brackets) a positive integer or expression that indicates the element-number of this array.
Remarks
- You can use uppercase and lowercase names indifferently; variable names are case insensitive.
- System variables may be displayed, but do not need to be defined using
*VARS or *TEXTVARS .
Example 1
*TEXTVARS Gender,Age *QUESTION 1 *CODES L1 *SAVE Gender Int. type gender of respondent
1: Male 2: Female
*QUESTION 2 *NUMBER L2 *SAVE Age How old are you?
*PAGE So you are a *?Gender of *?Age years old.
Result of Example 1
Example 2
*TEXTVARS txt[4]
*PUT txt[1] "This is a text." *PUT txt[2] "Another text." *PUT txt[3] "Third text." *PUT txt[4] "The fourth line contains: '*?txt[1] *?txt[2] *?txt[3]'"
*PAGE *? txt[1] *? txt[2] *? txt[1] *? txt[2] *? txt[3] *? txt[4]
Result of Example 2
Example 3
*TEXTVARS Number, Price, PricePerFax *FONT 0 "10 Arial" *TAB 30
*QUESTION 1 *FORM Specify count and price:
1:Number of fax machines bought: *NUMBER 61L3 *SAVE Number 2:Total price paid: € *NUMBER 64L4.2 *SAVE Price
*FORMAT 3.2 *PUT PricePerFax [Q1F2 / Q1F1]
*QUESTION 2 *CODES 70L1 You bought *? Number fax machines for € *? Price?
So the average price per fax machine was € *? PricePerFax ?
1: Yes 2: No
Result of Example 3
|