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

entryref

1995 Version of ANSI (Equivalent to Current ISO Version) of 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.

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::=

[ | environment | ] 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.

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

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