1. Default parameters and call_func/call_proc

Do default parameters work when a routine is called via call_func/call_proc?

new topic     » topic index » view message » categorize

2. Re: Default parameters and call_func/call_proc

jaygade said...

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.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Default parameters and call_func/call_proc

Interesting, thanks.

That should probably be noted in the manual somewhere, unless I'm missing the reference.

new topic     » goto parent     » topic index » view message » categorize

4. Re: Default parameters and call_func/call_proc

jaygade said...

Interesting, thanks.

That should probably be noted in the manual somewhere, unless I'm missing the reference.

call_func:

TFM said...

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

new topic     » goto parent     » topic index » view message » categorize

5. Re: Default parameters and call_func/call_proc

jaygade said...

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.

new topic     » goto parent     » topic index » view message » categorize

6. Re: Default parameters and call_func/call_proc

mattlewis said...
jaygade said...

Interesting, thanks.

That should probably be noted in the manual somewhere, unless I'm missing the reference.

call_func:

TFM said...

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.

new topic     » goto parent     » topic index » view message » categorize

7. Re: Default parameters and call_func/call_proc

Pete smiles to himself knowing that default parameters work just fine with call_func/call_proc on his crappy-little-windows-only-Phix blink

new topic     » goto parent     » topic index » view message » categorize

8. Re: Default parameters and call_func/call_proc

petelomax said...

Pete smiles to himself knowing that default parameters work just fine with call_func/call_proc on his crappy-little-windows-only-Phix blink

Heh -- let me know when it works on OS X and Linux... smile

Or if the source is available I might play with it myself.

new topic     » goto parent     » topic index » view message » categorize

9. Re: Default parameters and call_func/call_proc

jaygade said...
petelomax said...

Pete smiles to himself knowing that default parameters work just fine with call_func/call_proc on his crappy-little-windows-only-Phix blink

Heh -- let me know when it works on OS X and Linux... smile

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/

new topic     » goto parent     » topic index » view message » categorize

10. Re: Default parameters and call_func/call_proc

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.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu