|
|
|
|
|
|
|
☜ | SET1977 Version of ANSI Standard | ☞ |
3.6.15 SET
S[ET] postcond L setargument
SET is the general means for explicitly assigning values to
variables. Each setargument assigns one value, defined by
its expr, to each of one or more variables, each named by
one glvn.
Each setargument is executed one at a time in
left-to-right order. The execution of one setargument
occurs in the following order.
- The glvns to the left of the = are scanned in
left-to-right order and all subscripts are evaluated, in
left-to-right order within each glvn.
- The expr to the right of the = is evaluated.
- The value of expr is given to each glvn, in
left-to-right order. For each subscripted glvn of the form
N(v1, v2, ..., vn), each
variable M whose name is of the form N(v1,
v2, ..., vm) for all m < n, as well as
the unsubscripted variable N, will be affected as follows.
- If M already has a "pointer", that is, if $D(M) has a value of
10 or 11, no change is made to the value of $D(M).
- If M has no pointer, that is, if $D(M) has a value of 0 or 1,
then it is given a pointer. If $D(M) was 0 it becomes 10, and if
$D(M) was 1 it becomes 11.
The $D value of the glvn itself is changed as
follows:
0 becomes 1
1 remains 1
10 becomes 11
11 remains 11.
That is, the pointer status is not altered, but the variable’s
value becomes defined. If the glvn is a global variable,
the naked indicator is set at the time that the glvn is
given its value. If the glvn is a naked reference, the
reference to the naked indicator to determine the name and
initial subscript sequence occurs just prior to the time that the
glvn is given its value.
See also the transition diagram for Set.
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, 18:56:15.
For comments, contact Ed de Moel (demoel@jacquardsystems.com)