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

GOTO

Draft MDC Standard

8.2.14 Goto

G[OTO] postcond SP L gotoargument

    gotoargument::=

entryref postcond
@ expratom V L gotoargument


Goto is a generalized transfer of control. If provision for a return of control is desired, Do may be used.

Each gotoargument is examined, one at a time in left-to-right order, until the first one is found whose postcond is either absent, or whose postcond is present and its tvexpr is true. If no such gotoargument is found, control is not transferred and execution continues normally. If such a gotoargument is found, execution continues at the left of the line it specifies, provided that the following conditions hold for the line containing the Goto command and the line specified by the gotoargument:

  1. they have the same LEVEL, and
  2. if that LEVEL is greater than one they
    1. must have no lines of lower execution LEVEL between them, and
    2. must be in the same routine.

If either A or B is not met, an error occurs with ecode = "M45".

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 12-Sep-2014, 10:11:23.

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