System Functions

GBL( )

Reference Global String Variable

Formats

1.

Get/Maintain Entries:

GBL(string_name$[,contents$][,ERR=stmtref])

2.

Delete/List Single Value:

GBL({DELETE | LIST}string_name$[,ERR=stmtref])

3.

Delete/List All Up to Value:

GBL({DELETE | LIST} TO string_name$[,ERR=stmtref])

4.

Delete/List Table:

GBL({DELETE | LIST}*[,ERR=stmtref])

Where:

*

(Asterisk) Indicates all global string table entries.

contents$

Value to assign to the global string. Optional. String expression.

stmtref

Program line number or statement label to which to transfer control.

string_name$

Name of the global string in the internal table. String expression.

Returns

Values in internal table of strings.

Note:
This function is primarily provided for compatibility with other languages and has been made virtually obsolete by global variables - a much more efficient way to handle common data elements (string, numeric, arrays, etc.).

Description

The GBL( ) function returns and maintains the values in an internal table of string definitions.

Format 1

Get/Maintain Entries
 
GBL(string_name$[,contents$][,ERR=stmtref])

Use this format to set or obtain the current value of the global string variable whose name you specify. If you include a contents value (optional), it will be placed into the global string variable.

Format 2

Delete/List Single Value
 
GBL({DELETE | LIST}string_name$[,ERR=stmtref])

Use the GBL(DELETE ...) format to delete an individual global string from the table.

Use the GBL(LIST ...) format to have the function return an individual string.

Format 3

Delete/List All Up to Value
 
GBL({DELETE | LIST} TO string_name$[,ERR=stmtref])

Use the GBL(DELETE TO ...) format to delete items up TO an individual global string from the table.

Use the GBL(LIST TO ...) format to have the function return a list of global string names up TO an individual item ($00$ separated).

Format 4

Delete/List Table
 
GBL({DELETE | LIST}*[,ERR=stmtref])

Use the GBL(DELETE *) format to remove all entries from the table.

The GBL(LIST *) format returns the names of all strings in the table ($00$ separated).