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

gvn

1990 Version of ANSI Standard

2.2.2.2 Global Variable Name gvn

    gvn::=

rgvn
@ expratom V gvn


See 2.2 for the definition of expratom. See section 1 for the definition of V.

    rgvn::=


^ ( L expr )
^ name [ ( L expr ) ]
@ gnamind @ ( L expr )



See 2.3 for the definition of expr. See 2.2.1 for the definition of name. See section 1 for the definition of L.

    gnamind::= rexpratom V gvn

See section 1 for the definition of V.

The prefix ^ uniquely denotes a global variable name. A global variable name is either unsubscripted or subscripted; if it is subscripted, any number of subscripts separated by commas is permitted. An abbreviated form of subscripted gvn is permitted, called the naked reference, in which the prefix is present but 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.

When gnamind is present it is always a component of an rgvn. If the value of the rgvn is a subscripted form of gvn, then some of its subscripts may have originated in the gnamind. In this case, the subscripts contributed by the gnamind appear as the first subscripts in the value of the resulting rgvn, separated by a comma from the (non-empty) list of subscripts appearing in the rest of the rgvn.

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. A nonnaked reference without subscripts leaves the naked indicator undefined.

The effect on the naked indicator described above occurs regardless 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)