Call a function: Difference between revisions

m
Line 2,061:
--?myfunction(b:="though") -- compile-time error</lang>
* The programmer is free to use either positional parameters or named parameters, or a mixture of both (with positional parameters first).
* Phix does not support first-class functions directly, but instead uses an integer routine_id mechanism (and obviously integers are first-class):
<lang Phix>constant integer r_my_func = routine_id("myroutine")
?call_func(r_my_func,{1}) -- displays {1,"default"}</lang>
7,806

edits