11.07.2015 Views

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

Caché ObjectScript Reference - InterSystems Documentation

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

$LISTGET• $LISTFIND function• $LISTGET function• $LISTLENGTH function• $LISTNEXT• $LISTSAME function$LISTGETReturns an element in a list, or a specified default value if the requested element is undefined.$LISTGET(list,position,default)$LG(list,position,default)ParameterslistpositiondefaultAn expression that evaluates to a valid list.Optional — An expression interpreted as a position in the specified list.Optional — An expression that provides the value to return if the listelement has an undefined value.Description$LISTGET returns the requested element in the specified list. If the value of the positionparameter refers to a nonexistent member or identifies an element with an undefined value,the specified default value is returned.The $LISTGET function is identical to the one- and two-argument forms of the $LISTfunction except that, under conditions that would cause $LIST to produce a error, $LISTGET returns a default value. See the description of the $LIST function for moreinformation on conditions that generate errors.ParameterspositionThe position parameter must evaluate to an integer. If it is omitted, by default, the functionexamines the first element of the list. If the value of the position parameter is -1, it is equivalentto specifying the last element of the list.<strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong> 253

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

Saved successfully!

Ooh no, something went wrong!