1. [phix niggles] First class routine
- Posted by _tom (admin) Apr 10, 2021
- 852 views
A few small details about routine_id:
integer rid = routine_id("print")
--> fatal problem with autoinclude "print"
Can be fixed as:
print(1, "do this first" ) integer rid = routine_id("print")
Must use integer but not number:
print(1, "do this first" ) number r_print = routine_id("print") r_print(1, "hello" )
r_print(1, "hello" ) ^ '=' expected
print(1, "do this first" ) integer r_print = routine_id("print") r_print(1, "hello" )
"do this first""hello"
be well
_tom
2. Re: [phix niggles] First class routine
- Posted by petelomax Apr 11, 2021
- 850 views
- Last edited May 23, 2021
_tom said...
--> fatal problem with autoinclude "print"
Should be fixed in the next release. No longer happens on the latest development version anyway.
Not quite sure what I've done but I think I ran into a similar problem with apply(s,sprint) and fixed that.
_tom said...
Must use integer but not number:
Fair point. I was probably a bit over-cautious about introducing new weird syntax errors.
Also, if I can call_func/proc(s[RID],{a,b,c}) then by rights I should be able to code s[RID](a,b,c). I'll look into it.
Update 23/5: this has now been fixed on the development version.