$Getg

From m204wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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.