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

$QUERY

1990 Version of ANSI Standard

2.2.7.13 $Query

$Q[UERY] ( glvn )

See 2.2.2.2 for the definition of glvn.

Let glvn1 = ^A(i1, i2, ..., ip) and glvn2 = ^A(j1, j2, ..., jq)

Then a collating relation exists between glvn1 and glvn2. Glvn2 is said to follow glvn1 when for any pair (ik, jk) when:

  1. p < q and ik = jk for all k in the range (0 < k '> p).
    or
  2. p = 0 and q > 0.
    or
  3. k > 0 and k '> min(p, q) and
    there exists some ik '= jk and
    no n exists with 0 < n < k and in '= jn and
    the function CO(ik, jk), as defined in 2.2.7 (definition of $Order), is equal to jk.
    In less formal terms, when the first index that is different, collates in glvn2 after the corresponding one in glvn1.

For the purpose of this discussion a function CQ(glvn1, glvn2) is defined that would yield glvn2 when, according to the above definition, glvn2 would be said to follow glvn1.

    namevalue::= expr

See 2.3 for the definition of expr.

A namevalue has the syntax of a glvn with the following restrictions:

  1. The glvn is not a naked reference.
  2. Each subscript whose value has the form of a number as defined in 2.2.3.1 appears as a numlit, spelled as its numeric interpretation.
  3. Each subscript whose value does not have the form of a number as defined in 2.2.3.1 appears as a sublit, defined as follows:
        sublit::= "

    " "
    ubnonquote


    ... "
    where subnonquote is defined as follows:
        subnonquote::= any character valid in a subscript, excluding the quote symbol.

Then the value of the function $Query can be defined as follows:

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)