1. Default parameters and call_func/call_proc
- Posted by jaygade Aug 07, 2013
- 1326 views
Do default parameters work when a routine is called via call_func/call_proc?
2. Re: Default parameters and call_func/call_proc
- Posted by jimcbrown (admin) Aug 07, 2013
- 1290 views
Do default parameters work when a routine is called via call_func/call_proc?
IIRC, they don't. The parser inserts the IL for each defaulted parameter at parse time for each instance the routine is called.. but it doesn't know which call_proc/call_func lines it needs to fix up as well. By the time of the actual call, that information has already been lost.
3. Re: Default parameters and call_func/call_proc
- Posted by jaygade Aug 07, 2013
- 1303 views
Interesting, thanks.
That should probably be noted in the manual somewhere, unless I'm missing the reference.
4. Re: Default parameters and call_func/call_proc
- Posted by mattlewis (admin) Aug 07, 2013
- 1304 views
Interesting, thanks.
That should probably be noted in the manual somewhere, unless I'm missing the reference.
args must be a sequence of argument values of length n, where n is the number of arguments required by the called function. Defaulted parameters currently cannot be synthesized while making a indirect call.
Matt
5. Re: Default parameters and call_func/call_proc
- Posted by jimcbrown (admin) Aug 07, 2013
- 1302 views
Interesting, thanks.
That should probably be noted in the manual somewhere, unless I'm missing the reference.
Agreed. I'm searching through the online manual as well and I can't find a reference anywhere.
6. Re: Default parameters and call_func/call_proc
- Posted by jaygade Aug 07, 2013
- 1311 views
Interesting, thanks.
That should probably be noted in the manual somewhere, unless I'm missing the reference.
args must be a sequence of argument values of length n, where n is the number of arguments required by the called function. Defaulted parameters currently cannot be synthesized while making a indirect call.
Matt
Okay, thanks. I must have just missed it.
7. Re: Default parameters and call_func/call_proc
- Posted by petelomax Aug 07, 2013
- 1306 views
Pete smiles to himself knowing that default parameters work just fine with call_func/call_proc on his crappy-little-windows-only-Phix
8. Re: Default parameters and call_func/call_proc
- Posted by jaygade Aug 07, 2013
- 1272 views
Pete smiles to himself knowing that default parameters work just fine with call_func/call_proc on his crappy-little-windows-only-Phix
Heh -- let me know when it works on OS X and Linux...
Or if the source is available I might play with it myself.
9. Re: Default parameters and call_func/call_proc
- Posted by jimcbrown (admin) Aug 07, 2013
- 1312 views
Pete smiles to himself knowing that default parameters work just fine with call_func/call_proc on his crappy-little-windows-only-Phix
Heh -- let me know when it works on OS X and Linux...
Or if the source is available I might play with it myself.
See http://phix.is-great.org/download.php
Apparently a Linux/GNU version is in progress...
I always thought that the choice of name was unfortunate, considering the more widely known Phix: http://phix-project.org/
10. Re: Default parameters and call_func/call_proc
- Posted by jaygade Aug 07, 2013
- 1268 views
A rose by any other name...
Anyway, I am more interested in doing more debugging of OpenEuphoria, eventually.
However, I've been temporarily distracted by sorting, given some of our current discussions. Playing with allsorts.ex and my own routines is what brought up this discussion thread.