Global variables


The global variables behave exactly like the normal variables. They can be set with =, their content is accessed via [].

They are valid in all macros and in command mode. The following examples illustrate how to manipulate them.

Global variables manipulation

MACRO PAWEX08D 1 G/CREATE PI 3.14159 Approximate value of PI G/CREATE GV This_is_a_text Text global variable 2 G/LIST 3 G/DELE GV G/LIST RETURN PAW > exe pawex08d @ = 0 | macro return value GV = This_is_a_text | Text global variable PI = 3.14159 | Approximate value of PI @ = 0 | macro return value PI = 3.14159 | Approximate value of PI 3 PAW > MESS [PI] 3.14159


  1. Global variables are created with a name, a value and an associated comment.
  2. This command allows to list all the global variables. Note that @ (macro return code) is defined as a global variable.
  3. Delete global variables.
  4. Global variables can de accessed outside macros.

PAW TutorialLast update: 1999/04/01 14.57
Olivier.Couet@Cern.Ch