11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

$GET$GETReturns the data value of a specified variable.$GET(variable,default)$G(variable,default)ParametersvariabledefaultA local or global variable, subscripted or unsubscripted. The variablemay be undefined.Optional — The value to be returned if the variable is undefined. If avariable, it must be defined.Description$GET returns the data value of a specified variable. The handling of undefined variablesdepends on whether you specify a default parameter.• $GET(variable) returns the value of the specified variable, or the null string if the variableis undefined. The variable parameter value can be the name of any variable, including asubscripted array element (either local or global).• $GET(variable,default) provides a default value to return if the variable is undefined. Ifthe variable is defined, $GET returns its value.ParametersvariableThe variable whose data value is to be returned. It can be a local variable or a global variable,either subscripted or unsubscripted. The variable does not need to be a defined variable. Thevariable can be defined and set to the null string (""). If a global variable, it can contain anextended global reference. If a subscripted global variable, it can be specified using a nakedglobal reference. Even when referencing an undefined subscripted global variable, variableresets the naked indicator, affecting future naked global references, as described below.defaultThe data value to be returned if variable is undefined. It can any expression, including a localvariable or a global variable, either subscripted or unsubscripted. If a variable, it must bedefined variable; if default is an undefined variable, $GET issues an error,<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 217

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!