Re: Euphoria DLLs

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

stabmaster_ at hotmail.com wrote:
> Rob, why did you use:
> 
>            p = 0.0 + pErrorDescription
> 
> instead of just:
> 
>             p = pErrorDescription
> 
> Is this some quirk to save cycles that you haven't 
 > told us about (or that i've just missed)?

A simple assignment would just copy (as is)
the improper 32-bit integer value
(passed in by the C program) into p
By performing a computation, it creates
a proper Euphoria atom, i.e. it creates an 8-byte
floating-point number to store the 32-bit integer value.

This trick can work because the translator does
not optimize-away additions by 0.0, nor does it
type-check parameter values.
(Note: I still haven't fully-tested this stuff.
I'm hoping the two interested people will try it.)

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