Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Need MUMPS Sample Code

Tags:

mumps

I am working on an analysis tool for which I need MUMPS sample code. Can anyone provide me MUMPS live code or sample code? Also suggest some links for same.

like image 486
Tina Avatar asked Nov 11 '10 05:11

Tina


People also ask

What type of language is MUMPS?

Mumps is a general purpose programming language that supports a novel, native, hierarchical database facility. The acronym stands for the Massachusetts General Hospital Utility Multi-programming System.

What type of database is MUMPS?

MUMPS stands for Massachusetts General Hospital Utility Multi Programming System. MUMPS is a multi-purpose programming language environment that gives users database access through program-level arrays and variables. MUMPS was not designed to be just a programming language; it is also an operating system and database.

What is MUMPS developer?

MUMPS was developed by Neil Pappalardo, Robert Greenes, and Curt Marble in Dr. Octo Barnett's lab at the Massachusetts General Hospital (MGH) in Boston during 1966 and 1967.

What is the difference between local and global in MUMPS?

Variables 1 Mumps has two types of variables: local and global. Global variables are stored on disk and continue to exist when the program that created them terminates. Local variables are stored in memory and disappear when the program that created them terminates.


2 Answers

This is some MUMPS i wrote for fun. I guess if you can analyze this, your tool works:

Q N R,Q,C,D,E,W,B,G,H,S,T,U,V,F,L,P,N,J,A S N=$G(N),Q='N,F=Q+Q,P=F+F,W=$L($T(Q))
 S W=$E(W,Q),S='N_+N,W=W-F*S,L=$G(L),R=$C(Q_F_P),R(F)=$C(F+Q_F),R(P)=$C(W-F) W #
 S T=$E($T(Q+F),F,W\S)_$C(W+S+F) X T S B=$P(T,$C(P_P),F),C=B\(W*W),D=B-(C*W*W)\W
 F G=S-Q:F:S+F+Q S E=B-(C*W*W+(D*W)),H=$E($T(Q),G),@H=$S(@H<S:'Q,Q:N)_@H,T=C_D_E
 F A=Q:Q:W\S S J=$E(T,A),C(F)=$S(J>(F+Q)&(J<(S-F)):Q,Q:+N),C(P)=$S(J#F:Q,Q:+N) D
 .S C(Q)=$S(J<(S-F):+N,Q:Q),C(F+Q)=$S(J>Q&(J<(S-F))&(J'=(P+'L))&(J'=(P)):Q,Q:+N)
 .S H('L)=L F  S H(N?.E)=$O(C(H('$G(N)))) Q:H('+L)=L  S F(A,H('L))=C(H(W[(W\S)))
 F U=Q:Q:P W !,R F V=Q:Q:P+F W $S(F(V,U):'Q,Q:$C(P_(W\S))) W:'(V#F) $C('N_F_F+F)
 W !!,R(F)_C_R(P)_D_R(P)_E_R(F) X $RE($E($T(Q),Q+F,P+Q))_R(P)_'N W # G:N=L Q+F Q

look ma, no literals!

This outputs a binary clock:

:D Q^ROU


|..|..|..|
|..|..|.0|
|..|.0|0.|
|..|00|..|

 00:13:24
like image 144
trurl Avatar answered Oct 18 '22 06:10

trurl


GitHub actually host many MUMPS software, but it unfortunatly get tagged as Objective-C or Matlab so it is not easy to search for MUMPS code over there. Here are some projects I know are done at least partially using MUMPS :

  1. OSEHRA
  2. Reynard GT.M Server
  3. GT.M Term Size
  4. GT.M POSIX Extension
  5. Tetris in MUMPS
  6. Juicy MUMPS Example
  7. GT.M PCRE Extension
  8. GT.M Digest Extension
  9. DataBallet
  10. Source KIDS
  11. Software development tools for MUMPS
like image 4
Laurent Parenteau Avatar answered Oct 18 '22 05:10

Laurent Parenteau