[fpc-pascal] Adding a array of float in ressource and use it ?

Sven Barth pascaldragon at googlemail.com
Mon Mar 6 14:29:54 CET 2017


Am 06.03.2017 13:42 schrieb "fredvs" <fiens at hotmail.com>:
>
> > I don't know. By all logic, it should not work either.
>
> Yes, it is I think too.
>
> Some more explanation:
>
> I use  a "global" buffer of float to store data.
> Those data can be int16, int32 or float32.
>
> For example,
>
> If data are integer (16 or 32 bit), I do:
>
> bufferfloat[x] := 127.0 ; (for int16)
>
> bufferfloat[x] := 2147483646.0; (for int32)
>
> If data are float 32 bit, I do:
>
> bufferfloat[x] := 0.2147483646 ; (for float32)
>
> So it seems to me Sizeof(bufferfloat[x]) is the same in the 3 cases (alway
> sizeof(float)).

Of course it's always the same size as it's an array of cfloat after all
and no assignment will change that.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20170306/b9b12004/attachment.html>


More information about the fpc-pascal mailing list