1. cdecl
Now that we have support for calling "__cdecl" functions, will there be an
easy way to call functions with multiple arguments? Do we need to define it
for each call with a different number of arguments? It would be nice to
have this functionality. The only problem I could see would be whether to
pass a 32-bit float or a 64-bit double.
2. Re: cdecl
Elliott Sales de Andrade wrote:
> Now that we have support for calling "__cdecl" functions, will there be
> an easy way to call functions with multiple arguments?
You mean a variable number of arguments.
I don't think it's a high priority to make this really easy.
> Do we need to define it for each call with a different
> number of arguments?
Yes, otherwise you'll get an error from Euphoria.
> It would be nice to have this functionality.
Do you have a real life example that you are working on?
Regards,
Rob Craig
Rapid Deployment Software
http://www.RapidEuphoria.com
3. Re: cdecl
>From: Robert Craig <rds at RapidEuphoria.com>
>Subject: Re: cdecl
>
>
>Elliott Sales de Andrade wrote:
>>Now that we have support for calling "__cdecl" functions, will there be an
>>easy way to call functions with multiple arguments?
>
>You mean a variable number of arguments.
>I don't think it's a high priority to make this really easy.
>
>>Do we need to define it for each call with a different
> > number of arguments?
>
>Yes, otherwise you'll get an error from Euphoria.
>
What I should have asked is, will this work? Will Euphoria just look at
the DLL and name and return the same ID without changing the parameter
formats?
>>It would be nice to have this functionality.
>
>Do you have a real life example that you are working on?
Well, yes I do. It's a printf() type function. In this case, it would have
to figure out whether to pass a char or a float, or a long, etc. Now that I
think about it, it probably wouldn't be so easy to automatically choose what
to do. I'm guessing I'll have to parse the format string myself, but I guess
that's OK if what I said before works.
>Regards,
> Rob Craig
> Rapid Deployment Software
> http://www.RapidEuphoria.com