global
VARIABLES

The global statement creates one or more global variables.


Parameters

This statement has one parameter:

variables – is a list of variables to be created. Each variable should be separated from the next by a comma. If a variable name contains spaces or punctuation it should be surrounded by chevron (« ») characters.


Description

The global statement creates one or more global variables. Global variables may be used by any procedure, and remain active until you quit from Panorama. Each variable has a name, and can be used to hold pieces of information (numbers, text or binary data).

Panorama keeps all global variables together in a common “pool” that is used by all procedures. If procedure A creates a global variable named myValue, that global variable may be used by all other procedures, in any open database. In fact you must be careful to avoid conflicts when creating global variables. If the name of a global variable in one procedure is the same as the name of a global variable in another procedure (even in a different database) that is used for a different purpose, a conflict will result. Global variable names can also conflict with field names. One solution to variable conflicts between databases is to use the fileglobal statement instead of the global statement.

The example creates two global variables, Channel and Home Timeouts.

global Channel, «Home Timeouts»

You may change the value of a variable with an assignment, like this:

«Home Timeouts»=«Home Timeouts»-1

See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0