- Oct
- 364
- 17
Check out a language called MUMPS. MUMPS - Wikipedia
It's my understanding that a Computer Sciences professor has recreated all the functionality of MUMPS in various C or C++ routines.
The language has very few commands and functions, so it can literally be learned in one day. Except for one or two commands/functions, each command or function can be abbreviated to a single letter, e.g., S X=''X
That means Set X equal to NOT NOT X. (Those are 2 single quotes.)
Why? S X=5
NOT X will be zero.
NOT (this new) X will be ONE, meaning "true".
So S X=''X is a normalization routine. It could also be written SET X=''X
MUMPS stores ALL data in variables. A variable on disk (called "global") begins with ^, a memory variable (called "local") doesn't.
So: SET X=5 creates a memory variable. SET ^X=5 creates a variable on disk.
A major difference between MUMPS and other languages is array subscripts can be non-numeric:
SET ^PATIENT("name", "surname")="Smith"
That will create a variable on disk named ^PATIENT, with a node ("name", "surname")
The arrays are sparse arrays--so you only have the final node, not:
^PATIENT
^PATIENT("name")
^PATIENT("name", "surname")
You cycle through the subscripts (whether numeric or not), with the function $ORDER. You determine whether a node exists and some additional information with $DATA.
The subscript names can be held in variables, i.e., ^PATIENT(name, surname) is not the same as ^PATIENT("name", "surname").
=============
I do realize the "text names" functionality could be done with current TCC by creating a bunch of variables and substituting those, e.g.,
set name=1
set surname=2
then create a PATIENT array variable and access it as:
PATIENT[name, surname]
It's my understanding that a Computer Sciences professor has recreated all the functionality of MUMPS in various C or C++ routines.
The language has very few commands and functions, so it can literally be learned in one day. Except for one or two commands/functions, each command or function can be abbreviated to a single letter, e.g., S X=''X
That means Set X equal to NOT NOT X. (Those are 2 single quotes.)
Why? S X=5
NOT X will be zero.
NOT (this new) X will be ONE, meaning "true".
So S X=''X is a normalization routine. It could also be written SET X=''X
MUMPS stores ALL data in variables. A variable on disk (called "global") begins with ^, a memory variable (called "local") doesn't.
So: SET X=5 creates a memory variable. SET ^X=5 creates a variable on disk.
A major difference between MUMPS and other languages is array subscripts can be non-numeric:
SET ^PATIENT("name", "surname")="Smith"
That will create a variable on disk named ^PATIENT, with a node ("name", "surname")
The arrays are sparse arrays--so you only have the final node, not:
^PATIENT
^PATIENT("name")
^PATIENT("name", "surname")
You cycle through the subscripts (whether numeric or not), with the function $ORDER. You determine whether a node exists and some additional information with $DATA.
The subscript names can be held in variables, i.e., ^PATIENT(name, surname) is not the same as ^PATIENT("name", "surname").
=============
I do realize the "text names" functionality could be done with current TCC by creating a bunch of variables and substituting those, e.g.,
set name=1
set surname=2
then create a PATIENT array variable and access it as:
PATIENT[name, surname]
Last edited: