Topic: Mumps functionality in C++ ???
Author: gur@hadassah.bitnet
Date: 27 Jun 93 13:51:22 +0200 Raw View
Has anybody heard ever met a class-library that might offer
the functionality of the Mumps language
I wish to explain what is this functionality
Each variable can be considered a string, even if it contains a number. All
string-operators apply
Each variable which represents a number (numeric string)
can be considered a number and all numeric operators apply
No definitions, no declarations are ever required.
Variables begin to exist when they are assigned a value (incl a null string)
Variables may be KILLED
The length of the string may reach 4 Kbytes
Variables can have an hierarchy of arrays, or not to have subscripts at all
The total length of all subscipts may reach 512 bytes
The subscripts may be strings or numbers
The strings occupy only the neccessary memory space
Examples:
A is the name of an array:
a=1
a(1)=1
a(1,2,3)="ASA"
a(1,2,"A")="BNJ"
a("John","AGE")=40
a("John","TELEPHONE")=4093498
a("John","child",1)="Nelly"
a("John","child",2)="David"
functions: (a partial list of course)
assignment
test for existence or for having "offspring"
example:
set a(1,2,3)=1 creates the variable a(1,2,3) and assigns it a value
subsequently, function $DEFINED(a(1,2,3)) will return "01" (exists)
function $DEFINED(a(1)) will return "10" (doesn't exist
but has offspring)
kill KILL a(1,2,3) will delete a(1,2,3) and free it's space
KILL a(1) will delete all a(1,...)
a(1,3),a(1,4,66,"ZZZ")
if they exist, and free their space
next find the next-in hierarchy variable.
given there are a(1),a(2),a(5) defined:
next(a(2)) equals to 5
next(a(5)) equals to a null string
next(a(5)) equals to a null string
next(a("")) equals to 1
previous is the reversed NEXT
--------------------
MGur
Hadassah medical center jerusalem israel
GUR@HADASSAH.BITNET