RosettaCodeData/Task/Pointers-and-references/M2000-Interpreter/pointers-and-references-2.m2000
2023-07-01 13:44:08 -04:00

30 lines
646 B
Text

Module TestFuncRef {
Function Alfa(x) {
=x**2
}
Def Beta(x)=x*2
Z=100
K=Lambda Z (x)->x**3/Z
Z=0
Module TestFun {
Read &Fun()
Print Fun(10)*3
}
TestFun &Alfa() ' 300
TestFun &Beta() '60
TestFun &K() ' 30
K=Lambda Z=50 (x)->x**3/Z
TestFun &K() ' 60
M$=Lambda$ t$="9876543210" (x)->Mid$(t$,x+1,1)
Module TestFun2 (&L$) {
For i=4 to 7 : Print L$(i): Next i
}
TestFun2 &M$
Module TestFun2 (&L$()) {
For i=4 to 7 : Print L$(i): Next i
}
TestFun2 &M$()
}
TestFuncRef