This is a collection of M scripts for learning purposes. The examples in this tutorial are run with GT.M. https://www.isharkfly.com/tag/mumps
Go to file
programarivm 6b1c4b79c8 hello-world-in-another-loop.mps is added 2019-09-23 19:28:12 +01:00
01-the-very-basics hello-world-in-another-loop.mps is added 2019-09-23 19:28:12 +01:00
.editorconfig .editorconfig is added 2019-09-23 17:04:03 +01:00
README.md hello-world-in-another-loop.mps is added 2019-09-23 19:28:12 +01:00

README.md

GPL MUMPS by Example

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...

The implementations currently available are:

The examples in this tutorial are run with GPL Mumps.

Prerequisites

Quick Setup

Download the open source distribution of the Mumps interpreter and run the following commands:

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

hello-world.mps

$ mumps 01-the-very-basics/hello-world.mps
Hello world

hello-world-in-a-loop.mps

$ mumps hello-world-in-a-loop.mps
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

$ 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

Contributions

Would you help make this tutorial better? Contributions are welcome.

Many thanks.