1. 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? 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.
>
I suppose you could define the same function more than once with
different arguments and then call the appropriate one?
2. RE: cdecl
> From: Elliott Sales de Andrade [mailto:quantum_analyst at hotmail.com]
> 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.
This can be done with my fptr library. It always takes an arbitrary number
of arguments. Rob's approach is a little more 'hard coded', so it wouldn't
be easy to do.
Matt Lewis
3. RE: cdecl
Elliott Sales de Andrade wrote:
> >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.
Or even easier would be to use Euphoria's sprintf() function and pass it
to the library's puts()/textout() function...
-- Brian