Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

$QUERY

1995 Version of ANSI (Equivalent to Current ISO Version) of Standard

7.1.5.15 $Query

$Q[UERY] ( glvn )

Follow these steps:

  1. Let glvn be a variable reference of the form Name(s1, s2, ..., sq ) where sq may be the empty string. If glvn is unsubscripted, initialize V to the form Name(""); otherwise, initialize V to glvn.
  2. If the last subscript of V is empty, Goto step e.
  3. If $D(V) \ 10 = 1, append the subscript "" to V, i.e., V is Name(s1, s2, ..., sq, "").
  4. If V has no subscripts, return "".
  5. Let s = $O(V).
  6. If s = "", truncate the last subscript off V, Goto step d.
  7. If s '= "", replace the last subscript in V with s.
  8. If $D(V) # 2 = 1, return V formatted as a namevalue.
  9. Goto step c.

If the value of $Query(glvn) is not the empty string and glvn includes an environment, then the namevalue shall include the environment; otherwise the namevalue shall not include an environment.

If the argument of $Query is a gvn, the naked indicator will become undefined and the value of $Reference will become equal to the empty string.

Button for 1977 Button for 1984 Button for 1990 Button for 1995 Button for MDC Button for notes Button for examples

Copyright © Standard Documents; 1977-2024 MUMPS Development Committee;
Copyright © Examples: 1995-2024 Ed de Moel;
Copyright © Annotations: 2003-2008 Jacquard Systems Research
Copyright © Annotations: 2008-2024 Ed de Moel.

This page most recently updated on 15-Nov-2023, 13:11:39.

For comments, contact Ed de Moel (demoel@jacquardsystems.com)