Call a function: Difference between revisions

m
Line 2,518:
PassRef &Alfa.Beta()
Print Alfa.x=11
}
Call Checkit
</lang>
 
===Light Event Function===
<lang M2000 Interpreter>
Module Checkit {
Group WithEvents Alfa {
Event "AddOne"
x=10
Function Beta {
=.x
.PrintIt .x+1
.x++
}
Module PrintIt (x) {
Call Event "AddOne", x
}
}
Module PassRef (&n()) {
z=n()
}
z=500
k=0
Function Alfa_AddOne (new z) {
\\ interpreter make a line: Read New Z
k+=z
Print z
}
PassRef &Alfa.Beta()
Print k=11, z=500
}
Call Checkit
404

edits