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

NEW

1990 Version of ANSI Standard

2.6.13 New

N[EW] postcond

[ SP ]
SP L newargument


See 2.5.1 for the definition of postcond. See section 1 for the definition of L.

    newargument::=



lname
( L lname )
@ expratom V L newargument




See 2.6.11 for the definition of lname. See 2.2 for the definition of expratom. See section 1 for the definition of V. See section 1 for the definition of L.

New provides a means of performing variable scoping.

The three argument forms of New are given the following names:

   a) lname:Selective New
b) (L lname):Exclusive New
c) Empty argument list:New All

See section 1 for the definition of L.

Each argument of the New command pushes a frame containing the New argument onto the PROCESS-STACK and copies a set of NAME-TABLE entries into the frame.

The actions of the three forms of New are then defined as:

   a) Selective New the NAME-TABLE entry for lname is copied into the frame.
b) Exclusive New the set of NAME-TABLE entries for all names except the names in the argument are copied into the frame.
c) New All all entries in the NAME-TABLE are copied into the frame.

In all three cases, the NAME-TABLE entries copied into the frame are subsequently deleted from the NAME-TABLE. This deletion has the effect of making the variable unknown in the current process context.

See 2.6.15 for a description of the actions of Quit.

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, 14:46:14.

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