Difference between revisions of "Common MUMPS Errors and What they Mean"
Line 1: | Line 1: | ||
− | |||
== MUMPS Language Errors == | == MUMPS Language Errors == | ||
First, the [[MUMPS Error List]] gives the list of MUMPS Error code defined in the MUMPS Standard. | First, the [[MUMPS Error List]] gives the list of MUMPS Error code defined in the MUMPS Standard. | ||
Line 18: | Line 17: | ||
calls (each of which requires the allocation of a new stack frame, | calls (each of which requires the allocation of a new stack frame, | ||
which contains such details as NEW variables and the return address). --- [[Greg Woodhouse]] | which contains such details as NEW variables and the return address). --- [[Greg Woodhouse]] | ||
+ | |||
+ | I am pulling deep from faulty memory. But you usually see this error in a | ||
+ | looping situation gone astray. You may have a FOR loop making DO calls | ||
+ | repeatedly without QUITing the DOs. If your programming logic is recursive | ||
+ | and calls itself repeatedly you can easily overflow the stack. How many DO | ||
+ | calls and FOR loops you can have nested varies depending upon the use of NEW | ||
+ | commands as NEWing variables takes up stack partition space. If you NEW | ||
+ | only a few variables, you can have more DO calls. NEW many variables and | ||
+ | you have fewer DO calls. -- [[Steven Mcphelan]] |
Revision as of 16:40, 8 March 2005
MUMPS Language Errors
First, the MUMPS Error List gives the list of MUMPS Error code defined in the MUMPS Standard.
== Vendor Specific
The MUMPS Error List isn't all of the errors you may encounter, however, as there are other errors that specific to a particular Implementation of MUMPS. This section attempts to classify them, and explain how they occur and how to change your program to avoid them.
Interpreter Stack Overflow
It can happen with repeatedly performing a DO command to any location. Anything that is putting new entries on the stack frame without eventually removing them. The stack on DSM or Cache can probably handle 300+ entries, so it never overflows with legitimate logic. --- Greg Kreis
Actually, I think you got into an infinite loop making repeated routine
calls (each of which requires the allocation of a new stack frame,
which contains such details as NEW variables and the return address). --- Greg Woodhouse
I am pulling deep from faulty memory. But you usually see this error in a looping situation gone astray. You may have a FOR loop making DO calls repeatedly without QUITing the DOs. If your programming logic is recursive and calls itself repeatedly you can easily overflow the stack. How many DO calls and FOR loops you can have nested varies depending upon the use of NEW commands as NEWing variables takes up stack partition space. If you NEW only a few variables, you can have more DO calls. NEW many variables and you have fewer DO calls. -- Steven Mcphelan