the #! syntax used in the scripts
This commit is contained in:
parent
9a82970741
commit
d88bde7c45
2
01-the-very-basics/01-hello-world.mps
Normal file → Executable file
2
01-the-very-basics/01-hello-world.mps
Normal file → Executable 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
2
01-the-very-basics/02-hello-world-in-a-loop.mps
Normal file → Executable 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
2
01-the-very-basics/03-hello-world-in-another-loop.mps
Normal file → Executable 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
2
01-the-very-basics/04-hello-world-in-a-nested-loop.mps
Normal file → Executable 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
5
01-the-very-basics/05-arithmetic-operations.mps
Normal file → Executable 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.",!
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user