Re: Euphoria equivalent to C typecasting

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

Jonas Temple wrote:
> 
> All,
> 
> Dumb question time.  I'm trying to come up with the Euphoria equivalent
> of the following code that gets a floating point value from a spot
> in memory:
> 
> longBuffer = (long *) (dataBuffer + bufferIndex);
> sprintf(prtBuffer+bufferCount+columnInfo[colIndex].width-11,
>         "%11ld", *longBuffer);
> 
> longBuffer is defined as "long * longBuffer;"
> 
> Any ideas?
> 
> Thanks,
> 
> Jonas
> 
I apologize, I copied the wrong section.  What I'm really interested in
is in extracting the floating point value from the memory location:

floatBuffer = (float *) (dataBuffer + bufferIndex);
sprintf(prtBuffer+bufferCount+columnInfo[colIndex].width-16,
        "%.8E", *floatBuffer);

Thanks,

Jonas

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

Search



Quick Links

User menu

Not signed in.

Misc Menu