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.

<strong>Caché</strong> <strong>ObjectScript</strong> Functions$QUERYPerforms a physical scan of a local or global array.$QUERY(reference,direction,target)$Q(reference,direction,target)ParametersreferencedirectiontargetA reference that evaluates to the name (and optionally subscripts) ofa local or global variable.Optional — The direction (forwards or backwards) to traverse the array.Optional — Returns the current data value of the local or global variablespecified in reference.Description$QUERY performs a physical scan of a local or global array; it returns the full reference,name and subscripts, of the defined node next in sequence to the specified array node. If nosuch node exists, $QUERY returns the null string.ParametersreferenceThe returned global reference can be at the same level, a lower level, or a higher level as thelevel specified in the reference parameter. If you specify reference without specifying subscripts,$QUERY returns the first defined node in the array.directionIf no direction is specified, the default direction is forward. If you wish to specify a direction,a parameter value of 1 will traverse the array forward, a value of -1 will traverse the arraybackward.targetIf you wish to specify a target, you must specify a direction. If the variable identified in thereference parameter is undefined, the target value remains unchanged.290 <strong>Caché</strong> <strong>ObjectScript</strong> <strong>Reference</strong>

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

Saved successfully!

Ooh no, something went wrong!