eval()
Call the function that stored in f
(ref
object) and return its value
eval(f, params)
f
(ref) — A ref
objectparams
(any, optional) — Parameters to be passed to the function stored in f
any
— Returns value returned by the function stored in f
f = ref(some_func())
a = eval(f, 4, 10, 2) ' a = 28
function some_func(x, y, z)
return x ^ 2 + y + z
stop
' Another example
do_something(sind())
function do_something(ref: f)
a = eval(f, 30) ' a = 0.5
stop