This commit is contained in:
programarivm 2019-09-26 21:50:50 +01:00
parent 4b2e8f35fc
commit 1c7e8cc6f9
3 changed files with 6 additions and 6 deletions

View File

@ -1,17 +1,17 @@
d hello^MyMath d hello^MyMathRoutines
r "Enter n: ",n,! r "Enter n: ",n,!
s areaCircle=$$areaCircle^MyMath(n) s areaCircle=$$areaCircle^MyMathRoutines(n)
w "areaCircle(",n,") = ",areaCircle,! w "areaCircle(",n,") = ",areaCircle,!
s fibonacci=$$fibonacci^MyMath(n) s fibonacci=$$fibonacci^MyMathRoutines(n)
w "fibonacci(",n,") = ",fibonacci,! w "fibonacci(",n,") = ",fibonacci,!
s factorialByVal=$$factorialByVal^MyMath(n) s factorialByVal=$$factorialByVal^MyMathRoutines(n)
w "factorialByVal(",n,") = ",factorialByVal,! w "factorialByVal(",n,") = ",factorialByVal,!
s m=n s m=n
do factorialByRef^MyMath(.n) do factorialByRef^MyMathRoutines(.n)
w "factorialByRef(",m,") = ",n,! w "factorialByRef(",m,") = ",n,!

View File

@ -177,7 +177,7 @@ Copy the examples into your `~/.fis-gtm/V6.3-003A_x86_64/r` folder and run:
factorialByVal(9) = 362880 factorialByVal(9) = 362880
factorialByRef(9) = 362880 factorialByRef(9) = 362880
> For further details also visit [MyMath.m](https://github.com/programarivm/mumps-examples/blob/master/03-routines/MyMath.m) > For further details also visit [MyMathRoutines.m](https://github.com/programarivm/mumps-examples/blob/master/03-routines/MyMathRoutines.m)
## 4. Databases ## 4. Databases