Previous Topic: $ALIAS()Next Topic: $GREG2JUL()


$GLOBAL()

This function allocates global variables that contain strings longer than 80 characters.

Syntax

result = $GLOBAL(ALLOC,&name,length)

Parameters

result

Null string if the operation was successful. Otherwise, error text is returned.

&name

Name of a global variable to be allocated. This variable must not have been previously used in any manner. If the name is coded directly in the function, it must be enclosed in single or double quotes. The name can also be placed in another variable and that variable name is specified as the argument.

length

Number of bytes to be reserved for data. The future assignments of data strings can take any length up to this value.

Usage Notes

Return Codes

101 - 103

ARG n MISSING OR INVALID

Example

result = $global('alloc','&bigvar',1000)
 vname = '&bigvar'
result = &global('alloc',vname,500)