M[UMPS] Special variables -- $STORAGE
Introduced in the 1977 ANSI M[UMPS] language standard.
The value of this variable is an implementation-specific measure for the amount of storage that is available for the manipulation of local variables.
IF $STORAGE<500 WRITE !,"Now",$STORAGE," left."
Assume that the following subroutine is available for execution:
SET LEVEL=0 WRITE "Start: ",$STORAGE DO X
will produce (note that these changes are implementation-specific):
The value of this variable is an implementation-specific measure for the amount of storage that is available for the manipulation of local variables.
IF $STORAGE<500 WRITE !,"Now",$STORAGE," left."
Assume that the following subroutine is available for execution:
X WRITE !,"Before NEW command: ",$STORAGE
NEW A,B,C
WRITE !,"After NEW command: ",$STORAGE
SET A=1,B=2,C=3
WRITE !,"After SET command: ",$STORAGE
SET LEVEL=LEVEL+1
IF LEVEL<6 DO X
QUIT
Then, the commandsSET LEVEL=0 WRITE "Start: ",$STORAGE DO X
will produce (note that these changes are implementation-specific):
Start: 153536
Before NEW command: 153456 Change is 80
After NEW command: 153360 Change is 96
After SET command: 153168 Change is 192
Before NEW command: 153168 Change is 0
After NEW command: 153120 Change is 48
After SET command: 152928 Change is 192
Before NEW command: 152928 Change is 0
After NEW command: 152880 Change is 48
After SET command: 152688 Change is 192
Before NEW command: 152688 Change is 0
After NEW command: 152640 Change is 48
After SET command: 152448 Change is 192
Before NEW command: 152448 Change is 0
After NEW command: 152400 Change is 48
After SET command: 152208 Change is 192
Before NEW command: 152208 Change is 0
After NEW command: 152160 Change is 48
After SET command: 151968 Change is 192
Keep in mind that every NEW command creates a new environment for one or more variables. Although the old environment for those variables may be temporarily hidden, that environment still consumes space in the memory allocated to local variable storage.
This document is © Ed de Moel, 1995-2005.
It is part of a book by Ed de Moel that is published under the title "M[UMPS] by Example" (ISBN 0-918118-42-5).
Printed copies of the book are no longer available.
This document describes the various operators that are defined in the M[UMPS] language standard (ANSI X11.1, ISO 11756).
The information in this document is NOT authoritative and subject to be modified at any moment.
Please consult the appropriate (draft) language standard for an authoritative definition.
In this document, information is included that will appear in future standards.
The MDC cannot guarantee that these 'next' standards will indeed appear.
It is part of a book by Ed de Moel that is published under the title "M[UMPS] by Example" (ISBN 0-918118-42-5).
Printed copies of the book are no longer available.
This document describes the various operators that are defined in the M[UMPS] language standard (ANSI X11.1, ISO 11756).
The information in this document is NOT authoritative and subject to be modified at any moment.
Please consult the appropriate (draft) language standard for an authoritative definition.
In this document, information is included that will appear in future standards.
The MDC cannot guarantee that these 'next' standards will indeed appear.