global Parameter

Assigns a value to a global variable to all documents in the Source view or the Editor window.

Scope: Global

Syntax

query global.Name 
set global.Name Value 

Options

Name 
User-defined name for the global variable.
Value 
Value assigned to the global variable.

Description

The global parameter assigns a value to a global variable to all documents in the Editor. Global variables remain until the Editor session is terminated. They may be set or queried from any file.

Note: The external command, proto, compares the current word with a list of global variables. If the keyword is in the list, proto substitutes the value of the variable. For more on using the proto command to insert values for variables, see Related References below.

Examples

  1. To display the value of a global variable called x, type:
    query global.x
  2. To assign the value company name to a global variable called x, type:
    set global.x company name 

API Return Code

-1 
The option specified with the parameter was not valid. Check the syntax requirements for the parameter and try the set or query command again.

Building External Commands Written in the C Language
docvar Parameter
docvarlist Parameter
globallist Parameter
Sample External Command: proto