MUMPS ![]() |
similar languages: | Caché ObjectScript | |
Description: | MUMPS (also known as M) stands for "Massachusetts general hospital Utility MultiPurpose System". Intersystems Caché is MUMPS compatible! |
Hello World (1) | Connel MacKenzie |
HELLO W "Hello World",! Q |
Prints "Hello World" onto the
screen. |
Hello World (2) | Connel MacKenzie |
HELLO ; C. MacKenzie ; 3/30/2001 ; "Hello World" routine WRITE "Hello World",! QUIT |
Prints "Hello World" onto the
screen. |
Hello World (interpreted mode) | Connel MacKenzie |
>W "Hello World",! |
Prints "Hello World" onto the
screen. |
Sorting | Connel MacKenzie |
SORT ; C. MacKenzie ; 3/30/2001 ; print out array X sorted ZWRITE X QUIT ; Invoking from interpreted mode: >KILL SET X("Hello")=" World?",X("WORLD")="Hi there." DO ^SORT ; result: ; X("Hello")=" World?" ; X("WORLD")="Hi there." ; Other example: >S X("Hello","World")="" ZW X ; result: ; X("Hello","World")="" |
Prints out an array
sorted. |
Squares (1) | Connel MacKenzie |
SQUARES F I=1:1:10 W I*I," " W ! Q |
Outputs the squares from 1 to
10. |
Squares (2) | Connel MacKenzie |
SQUARES ; C. MacKenzie ; 3/30/2001 ; output squares from 1 to 10 FOR I=1:1:10 WRITE I*I," " WRITE ! QUIT |
Outputs the squares from 1 to
10. |
Squares (interpreted mode) | Connel MacKenzie |
>F I=1:1:10 W I*I," " |
Outputs the squares from 1 to
10. |