I'm starting a project where I need to have some reading knowledge of MUMPs, the Massachusetts General Hospital Utility Multi-Programming System. I've managed to get it working on my OS X El Capitan computer. I can do some of the simple things, but cannot seem to create a simple subroutine. According to the specs that I can find, a subroutine is created by a label then followed by lines that start with a tab or blank and instructions, so that
HELLO
WRITE "Hello, World!",!
QUIT
would be a subroutine that I could invoke using
DO HELLO
When I try to enter it, it immediately executes the WRITE statement.
Also, many examples are of the form:
DEMO
Kill For i=1:1:10 SET Ary(i)=i*2
DO Average Write !,"Average=",AVG
KILL Ary,AVG,i
QUIT
Average SET Sum=0;
; Do something here
QUIT
When I start typing the DO Average line, I get an error that Average isn't defined.
Any ideas on how one enters the subroutine?