How to create a subroutine in MUMPS on Mac os X
<p>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</p>

<pre><code>HELLO
   WRITE "Hello, World!",!
   QUIT
</code></pre>

<p>would be a subroutine that I could invoke using</p>

<pre><code>DO HELLO
</code></pre>

<p>When I try to enter it, it immediately executes the WRITE statement.</p>

<p>Also, many examples are of the form:</p>

<pre><code>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
</code></pre>

<p>When I start typing the DO Average  line, I get an error that Average isn't defined.</p>

<p>Any ideas on how one enters the subroutine?</p>