This line in MUMPS is not only valid, it also actually does something potentially useful:
s:foo'="" foo(foo)=foo
It's actually a bit tricky to explain what it does. Everything in MUMPS is effectively a tree. Each tree has a value in the "root node" and you can set it like this:
set foo="hello"
You can also put data deeper into the tree:
set foo("fizz")="buzz"
So if something is passed to you and you want to know if you can treat it as a string, you test to see if it's a null string:
if foo'="" do [something]
('= means !=)
Two more features: 1) Almost every directive can be reduced to one letter. 2) If I want to quit based on a condition, I can do either
if condition quit
or
quit:condition
Comments
This line in MUMPS is not only valid, it also actually does something potentially useful:
It's actually a bit tricky to explain what it does. Everything in MUMPS is effectively a tree. Each tree has a value in the "root node" and you can set it like this: You can also put data deeper into the tree: So if something is passed to you and you want to know if you can treat it as a string, you test to see if it's a null string: ('= means !=)Two more features: 1) Almost every directive can be reduced to one letter. 2) If I want to quit based on a condition, I can do either if condition quit or quit:condition
So the line above is more legibly written as
So if foo="bar", it's equivalent to:It is amazing that MUMPS will be 50 years old in 2 years -- and it still alive and kicking.
An emergency MUMPS project is still my highest billing project (per hour) ever.
What was the rate?