$Getg

From m204wiki
Revision as of 13:19, 20 April 2013 by Alex (talk | contribs) (Automatically generated page update)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

The $GETG function retrieves information stored by a $SETG function in the same request or an earlier request.

The $GETG function takes a global variable name as its one argument. The global variable table is searched for a variable with the name given by the argument. The value of the function is the value of the global variable if it is found or a null string (two quotes with no space between them) if it is not found. $GETG ('X') does not distinguish between the following situations:

  • There is no variable with the name X in the table.
  • There is a variable in the table with the name X whose value is a null string (a $SETG ('X',) that had been executed earlier).

Refer to Using global string variables to tailor a request for a detailed explanation of global variables and examples of the $GETG function within a request.