Re: cdecl

new topic     » goto parent     » topic index » view thread      » older message » newer message

>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

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu