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

entryref

Draft MDC Standard

8.1.6.1 Entry reference entryref

The total line specification in Do, Goto, Job, and $Text is in the form of entryref.

    entryref::=

dlabel [ + intexpr] [ ^ routineref ]
^ routineref


If the routine reference (^ routineref) is absent, the routine being executed is implied. If the line reference (dlabel [+intexpr]) is absent, the first line is implied.

If +intexpr is absent, the line denoted by dlabel is the one containing label in a defining occurrence. If +intexpr is present and has the value n '< 0, the line denoted is the nth line after the one containing label in a defining occurrence. A negative value of intexpr causes an error condition with ecode = "M12". When label is an instance of intlit, leading zeros are significant to its spelling.

In the context of Do , Goto, or Job, either of the following conditions causes an error condition with ecode = "M13".

  1. A value of intexpr so large as not to denote a line within the bounds of the given routine.
  2. A spelling of label which does not occur in a defining occurrence in the given routine.

In any context, reference to a particular spelling of label which occurs more than once in a defining occurrence in the given routine will have undefined results.

Editor’s note:
Clause 6.2.3 specified that such a label cannot exist, and that an error with ecode = "M57" occurs at an attempt to create such a label.
It was recommended (X11/1999–7) to change this sentence to:
In any context, reference to a particular spelling of a label which occurs more than once in a defining occurrence in the given routine will not be possible, because the insertion of such a duplicate label will cause an error with ecode = "M57".

Do, Goto, and Job commands, as well as the $Text function, can refer to a line in a routine other than that in which they occur; this requires a means of specifying a routinename.

Any line in a given routine may be denoted by mention of a label which occurs in a defining occurrence on or prior to the line in question.

    dlabel::=

label
@ expratom V L dlabel


    routineref::=

[ VB environment VB ] routinename
@ expratom V routineref


If the routineref includes an environment, then the routine is fetched from the specified environment. Reference to a non-existent environment causes an error condition with an ecode = "M26".

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.

Some specifications are "approved for inclusion in a future standard". Note that the MUMPS Development Committee cannot guarantee that such future standards will indeed be published.

This page most recently updated on 15-Nov-2023, 13:20:59.

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