mumps-demo/README.md

86 lines
3.1 KiB
Markdown
Raw Normal View History

2019-09-23 12:16:08 -04:00
# GPL MUMPS by Example
2019-09-23 11:33:02 -04:00
2019-09-23 12:13:32 -04:00
**MUMPS** ("Massachusetts General Hospital Utility Multi-Programming System"), or **M**, is a general-purpose computer programming language originally designed in 1966 for the healthcare industry. Its differentiating feature is its "built-in" database, enabling high-level access to disk storage using simple symbolic program variables and subscripted arrays; similar to the variables used by most languages to access main memory. [Read more...](https://en.wikipedia.org/wiki/MUMPS)
The implementations currently available are:
- [Intersystems (Caché)](http://www.intersystems.com/)
- [FIS (GT.M)](http://www.fisglobal.com/products-technologyplatforms-gtm)
- [MUMPS Database and Language by Ray Newman](http://sourceforge.net/projects/mumps/)
- [Open Mumps](http://www.cs.uni.edu/~okane/)
The examples in this tutorial are run with GPL Mumps.
2019-09-23 11:33:02 -04:00
## Prerequisites
- [The Mumps Programming Language](https://www.cs.uni.edu/~okane/)
2019-09-23 11:55:06 -04:00
- [Mumps Language Users' Guide](https://www.cs.uni.edu/~okane/source/MUMPS-MDH/ReadMe.pdf)
- [Mumps Language Quick Introduction & Tutorial](https://www.cs.uni.edu/~okane/source/MUMPS-MDH/MumpsTutorial.pdf)
2019-09-23 11:33:02 -04:00
## Quick Setup
2019-09-23 11:48:15 -04:00
Download the open source distribution of the [Mumps interpreter](https://www.cs.uni.edu/~okane/source/MUMPS-MDH/mumps-18.02.src.tar.gz) and run the following commands:
2019-09-23 11:33:02 -04:00
tar -zxvf mumps-18.02.src.tar.gz
cd mumpsc
sudo ./ConfigureNative.script
sudo ./BuildMumpsWithGlobalsInSingleUserNative.script
The resulting interpreter is located in `/usr/bin/mumps`.
$ mumps
Mumps 17.30; Built: 16:05:53 Sep 23 2019
Float: double; DBMS: Native Stand Alone; Hardware math: yes; Int: int; Float digits: 6; Cache: 33; Block: 2048; FP Bits: N/A
http://threadsafebooks.com/
Enter HALT to exit
> write "Hello world"
Hello world
> halt
EOF - goodbye ...
## 1. The Very Basics
2019-09-23 12:16:08 -04:00
### [`hello-world.mps`](https://github.com/programarivm/gpl-mumps-by-example/blob/master/01-the-very-basics/hello-world.mps)
2019-09-23 11:33:02 -04:00
$ mumps 01-the-very-basics/hello-world.mps
Hello world
2019-09-23 13:50:48 -04:00
### [`hello-world-in-a-loop.mps`](https://github.com/programarivm/gpl-mumps-by-example/blob/master/01-the-very-basics/hello-world-in-a-loop.mps)
$ mumps hello-world-in-a-loop.mps
2019-09-23 13:50:48 -04:00
Hello world
Hello world
Hello world
Hello world
Hello world
Hello world
Hello world
Hello world
Hello world
Hello world
### [`hello-world-in-another-loop.mps`](https://github.com/programarivm/gpl-mumps-by-example/blob/master/01-the-very-basics/hello-world-in-another-loop.mps)
$ mumps hello-world-in-another-loop.mps
Hello world
Hello world
Hello world
Hello world
Hello world
Hello world
Hello world
Hello world
Hello world
Hello world
2019-09-23 11:33:02 -04:00
---
### Contributions
Would you help make this tutorial better? Contributions are welcome.
- Feel free to send a pull request
- Drop an email at info@programarivm.com with the subject "Open MUMPS by Example"
- Leave me a comment on [Twitter](https://twitter.com/programarivm)
- Say hello on [Google+](https://plus.google.com/+Programarivm)
Many thanks.