Re: How can I pass an atom to a C function as C float or double

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

>From: Diana Nistor <myotis at xnet.ro>
>Subject: Re: How can I pass an atom to a C function as C float or double
>
>
>I really don't know what is the problem
>with my email program ...=20
>Sory for all that "=3D20 ... ".
>

Sometimes Topica screws it up itself.

>Also, the message I send have some line
>deleted.=20

I thought they were in the other message....

>I write here again :
>
>
>EXAMPLE :
>// C function in dll remain the same :
>void MyFunction(float ParameterA);
>
>-- but in euphoria I define the function like this :
>constant xMyFunction =3D define_c_proc(mydll, "MyFunction", {C_INT})
>
>-- then in the procedure I did the magic thing :
>procedure MyFunction(atom ParameterA)
>
>ParameterA =3D bytes_to_int(atom_to_float32(ParameterA))
>
>c_proc(xMyFunction, ParameterA)
>
>end procedure
>

This is technically, the same as the memory thing, but without pointers.
Please see other post.

>Please tell me what you think about this ...
>I did some tests and it work. The problem is that is slow.
>
>Sorry again.
>Diana Nistor
>
>
>=0D
>=0D
>Nota: RAV AntiVirus poate sa nu detecteze toti virusii noi sau toate 
>varian=
>tele lor.=0D
>Va rugam sa luati in considerare ca exista un risc de fiecare data cand 
>des=
>chideti=0D
>fisiere atasate si ca MobiFon nu este responsabila pentru nici un 
>prejudici=
>u cauzat=0D
>de virusi.=0D
>=0D
>Disclaimer: RAV AntiVirus may not be able to detect all new viruses and 
>var=
>iants.=0D
>Please be aware that there is a risk involved whenever opening e-mail 
>attac=
>hments=0D
>to your computer and that MobiFon is not responsible for any damages 
>caused=
>  by=0D
>viruses.=0D
>
>
>
>TOPICA - Start your own email discussion group. FREE!
>
>

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

Search



Quick Links

User menu

Not signed in.

Misc Menu