the #! syntax used in the scripts

This commit is contained in:
programarivm 2019-09-24 17:33:58 +01:00
parent 9a82970741
commit d88bde7c45
5 changed files with 11 additions and 2 deletions

2
01-the-very-basics/01-hello-world.mps Normal file → Executable file
View File

@ -1 +1,3 @@
#!/usr/bin/mumps
write "Hello world",!

2
01-the-very-basics/02-hello-world-in-a-loop.mps Normal file → Executable file
View File

@ -1 +1,3 @@
#!/usr/bin/mumps
for i=1:1:10 write "Hello world",!

2
01-the-very-basics/03-hello-world-in-another-loop.mps Normal file → Executable file
View File

@ -1,2 +1,4 @@
#!/usr/bin/mumps
for i=1:1:10 do
. write "Hello world",!

2
01-the-very-basics/04-hello-world-in-a-nested-loop.mps Normal file → Executable file
View File

@ -1,3 +1,5 @@
#!/usr/bin/mumps
for i=1:1:2 do
. for j=1:1:5 do
.. write i,":",j," Hello world",!

5
01-the-very-basics/05-arithmetic-operations.mps Normal file → Executable file
View File

@ -1,10 +1,11 @@
#!/usr/bin/mumps
; the following two are the first lines of a story
set apples=7
set pears=8
set oranges=9
set total=apples+pears+oranges
; the following two are the first lines of a story
write "There were ",apples," apples, ",pears," pears and ",oranges," oranges,",!
write "a total of ",total," fruits in a basket.",!