36 lines
946 B
Plaintext
36 lines
946 B
Plaintext
Module checkit {
|
|
Module dummy {
|
|
i++
|
|
Print Number
|
|
}
|
|
\\ using Stack New { } we open a new stack for values, and old one connected back at the end
|
|
\\ using block For This {} we erase any new definition, so we erase i (which Local make a new one)
|
|
a$={
|
|
Stack New {
|
|
For this {
|
|
Local i
|
|
for i=1 to 10 : print i : next i
|
|
}
|
|
}
|
|
If valid(k) then print k
|
|
}
|
|
i=500
|
|
k=600
|
|
Push 1000
|
|
inline a$
|
|
Print i=500
|
|
Print Number=1000
|
|
\\ eval an expression
|
|
Print Eval("i+k")
|
|
\\ eval a function
|
|
Print Function("{read x : = x**2}", 2)=4
|
|
Dim k(10)=123
|
|
\\ eval array only
|
|
Print array("k()", 2)=123
|
|
Push 10, 10
|
|
\\ call a module by make it inline first
|
|
inline code dummy, dummy
|
|
Print i=502
|
|
}
|
|
CheckIt
|