4 ms·
That'll be because there's only a single namespace, and the NEW command simply copies the values of the named global variables onto the stack and copies them ba
by david-given 10y ago
That'll be because there's only a single namespace, and the NEW command simply copies the values of the named global variables onto the stack and copies them back again at the end of the function.
I'm actually kinda used to that; I grew up with BBC Basic, which behaves the same way:
10 i = 0
20 PROCtest1
30 END
40 :
50 DEF PROCtest1
60 LOCAL i
70 i = 1
80 PROCtest2
90 ENDPROC
100 :
110 DEF PROCtest2
120 PRINT i
130 ENDPROC
> RUN
1
...it occurs to me that BBC Basic, at least the later versions with block IFs, is a better language than Mumps in almost every way (except the integrated database stuff)!