7.4

Table Of Contents
The name of the variable, prefixed with the ampersand (&) character. The name must conform to the rules for names
described in "Names" (page 221).
type
Constant value specifying the variable type, either integer, measure, string, Boolean, or an array type. The array types are
color, arrayinteger, arraymeasure, arraycurrency, arrayBoolean, arraystring or directory. Once a type is assigned to a var-
iable, it cannot be changed, unless the variable is redefined.
value
An initial value for the variable, of the same type as the variable (for example if the variable is of type integer, this value must
be an integer). This value can also be a valid PlanetPress Talk expression. In the case of any array variable other than a color
array or an array of type directory, the initial value can be either the number of elements you want the array to contain, or the
set of values you want the array to contain. In the former case you assign values to the array elements in subsequent com-
mands. In the latter case, you separate each value by a comma, and enclose the complete set of elements in square brackets.
In the case of a string array, you must also quote each of the array elements. In an array of type directory, you specify the
pathname to the folder and the file name filter you want to apply to each of the files in that folder; this in turn determines the
number of elements in the array.
Code Sample Example
define( &customer_name, string, 'Smith' )
define( &invoice_number, integer, strtoint(@(1,1,10)) )
define( &left_margin, measure, 1.5 )
define( &is_bottom, boolean, (&current.line > 50) )
define( &my_array,arrayinteger,[12,3,76,109,4] )
define( &my_array,arrayinteger, 5 )
define( &prices,arraycurrency, 6)
define( &greetings,arraystring,['hello','bonjour','ola'] )
define( &mustard,color,[0,12,84,16] )
define( &image_paths, directory, 'c:\\images\\*.JPG' )
define( &cost, currency, 0.00 )
Put (procedure)
Assigns a value to an element of an array.
Syntax
put( &array, index, value )
Arguments
&array
Array variable containing the element whose value you want to change.
index
Integer value representing the position of the element in the array.
value
©2010 Objectif Lune Inc - 562 -