Function eval()

← Back to Module core



Module core → eval()

Description

Call the function that stored in f (ref object) and return its value

eval(f, params)


Parameters


Return Value


Usage Example

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