Declare public memory variable and optionally assign a data type and value
PUBLIC <variable1> [AS <datatype>] [= <value>] [, <variable2> [AS <datatype>] [= <value>]...]
The PUBLIC statement declares global memory variables or arrays. Memory variables or arrays that have been declared PUBLIC can be shared and modified by all procedures and programs. By default, any variables created at the Recital development prompt are declared PUBLIC. A PUBLIC memory variable is initially declared as a logical, with a value of .F.. If the optional = <value> clause is included, then the specified value is assigned to the variable.
Memory variables and arrays declared with the optional AS <datatype> clause are subject to data type checking when a value is assigned. An attempt to assign a value of an incompatible data type will fail and return error 306. The following <datatype> values can be specified:
public i as numeric = 42, j as character, k
Recital, Recital Server