☜ | NEW1995 Version of ANSI (Equivalent to Current ISO Version) of Standard | ☞ |
N[EW] postcond | │ │ │ |
[ SP ] SP L newargument |
│ │ │ |
newargument | ::= | │ │ │ │ │ |
lname newsvn ( L lname ) @ expratom V L newargument |
│ │ │ │ │ |
newsvn | ::= | │ │ │ |
$ET[RAP] $ES[TACK] |
│ │ │ |
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 | |
d) | newsvn | New svn |
The following discussion uses terms defined in the Variable Handling (see 7.1.2.2) and Process-Stack (see 7.1.2.3) models and, like those subclauses, does not imply a required implementation technique. Each argument of the New command creates a CONTEXT-STRUCTURE consisting of a New NAME-TABLE and an exclusive indicator, attaches it to a linked list of CONTEXT-STRUCTUREs associated with the current PROCESS-STACK frame, and modifies currently active NAME-TABLEs as follows:
a) | New All | marks the CONTEXT-STRUCTURE as exclusive, copies the currently active NAME-TABLE to the New NAME-TABLE and makes all entries in the currently active local variable NAME-TABLE point to empty DATA-CELLs. | |
b) | Exclusive New | marks the CONTEXT-STRUCTURE as exclusive, copies the currently active NAME-TABLE to the New NAME-TABLE and changes all entries in the currently active local variable NAME-TABLE, except for those corresponding to names specified by the command argument, to point to empty DATA-CELLs. | |
c) | Selective New | copies the entry corresponding to the name specified by the command argument to the New NAME-TABLE and makes that entry in the currently active NAME-TABLE point to an empty DATA-CELL. | |
d) | New svn | copies the entry corresponding to the name specified by the command argument to the New NAME-TABLE and updates that entry as follows: |
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)