Function ref::construct()

← Back to Class ref



Module coreClass ref → construct()

Description

The constructor. Create an instance of class ref and store address of a function. To call the function, use function call() or eval()

ref::construct(fn)


Parameters


Return Value


Usage Example

f = ref(some_func())
call(f, 4)
 
function some_func(x)
    writeln(x ^ 2)
stop
 
' Output:
' 16