Skip to main content

Introduction to Global Names and Limits

Introduction to Global Names and Limits

The basic rules for global names are as follows:

  • The name begins with a caret character (^) prefix. This caret distinguishes a global from a local variable.

  • The next character can be a letter or the percent character (%):

    • Globals with names that start ^% are available in all namespaces. These are sometimes called percent globals.

    • Globals with names that do not use % are available only in the current namespace unless there are global mappings in effect.

  • The other characters of a global name may be letters, numbers, or the period (.) character, except that the last character of the name cannot be a period.

  • A global name may be up to 31 characters long (exclusive of the caret character prefix). You can specify global names that are significantly longer, but InterSystems IRIS treats only the first 31 characters as significant.

  • Global names are case-sensitive.

  • There are naming conventions to follow to avoid collision with InterSystems globals; see Global Variable Names to Avoid.

  • InterSystems IRIS imposes a limit on the total length of a global reference, and this limit, in turn, imposes limits on the length of any subscript values. See Maximum Length of a Global Reference.

For more details, see Rules and Guidelines for Identifiers.

Variations

  • A process-private global is an array variable that is only accessible to the process that created it. The name of a process-private global starts with ^|| rather than a single caret (^). For details, see Process-Private Globals.

  • You can refer to a global in another namespace via an extended global reference.

FeedbackOpens in a new tab