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

gvn

1977 Version of ANSI Standard

3.2.3 Global Variable Name gvn

    gvn::=

^ ( L expr )
^ name [ ( L expr ) ]
@ expratom V gvn


See also the transition diagram for gvn.

The prefix ^ uniquely denotes a global variable name. A global variable name is either unsubscripted or subscripted; if it is sub-scripted, any number of subscripts separated by commas is permitted. There is permitted an abbreviated form of subscripted gvn, called the “naked reference”, in which the name and an initial (possibly empty) sequence of subscripts is absent but implied by the value of the “naked indicator”. An unsubscripted occurrence of gvn may carry a different value from any subscripted occurrence of gvn.

Every executed occurrence of gvn affects the naked indicator as follows. If, for any positive integer m, the gvn has the nonnaked form N(v1, v2, ..., vm), then the m-tuple N, v1, v2, ..., vm–1, is placed into the naked indicator when the gvn reference is made. A subsequent naked reference of the form

^(s1, s2, ... si) (i positive)

results in a global reference of the form

N(v1, v2, .. , vm–1, s1, s2, ..., si)

after which the m+i–1-tuple N, v1, v2, ..., si–1 is placed into the naked indicator. Prior to the first executed occurrence of a nonnaked form of gvn, the value of the naked indicator is undefined. It is erroneous for the first executed occurrence of gvn to be a naked reference.

Two types of global references leave the naked indicator undefined.

  1. A nonnaked reference without subscripts.
  2. A nonnaked reference of the form, or a naked reference resulting in the form
    N(v1, v2, ..., vn) (n positive)
    for which $D(N(v1, v2, ..., vn–1)) < 10. (If n=1, read: $D(N) < 10.)

The effect on the naked indicator described above occurs regard-less of the context in which gvn is found; in particular, an assignment of a value to a global variable with the command SET gvn = expr does not affect the value of the naked indicator until after the right-side expr has been evaluated. The effect on the naked indicator of any gvn within the right-side expr will precede the effect on the naked indicator of the left-side gvn.

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 17-Nov-2023, 11:24:33.

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