double float in CallCFunction

Just starting out? Need help? Post your questions and find answers here.
pj
New User
New User
Posts: 1
Joined: Thu Oct 28, 2004 6:31 am

double float in CallCFunction

Post by pj »

I am trying to use PureBasic to call a number of 3rd party dlls using
CallCFunction (to drive a digital camera). Unfortunately, one of them requires that I pass a 64-bit (double) floating point variable (representing
integration time in seconds). Is there a straightforward way to convert a 32-bit floating point to get around the lack of 64-bit representation in Pure Basic?
PJ
Manolo
User
User
Posts: 75
Joined: Fri Apr 25, 2003 7:06 pm
Location: Spain

Post by Manolo »

Return to the forum
Moonshine
Enthusiast
Enthusiast
Posts: 263
Joined: Tue May 25, 2004 12:13 am
Location: UK

Post by Moonshine »

That might not work, OpenGL wouldnt accept F64 doubles...
Mark my words, when you least expect it, your uppance will come...
jack
Addict
Addict
Posts: 1358
Joined: Fri Apr 25, 2003 11:10 pm

Post by jack »

the Dll probably expects a double value rather than a pointer to a double, try this:

Code: Select all

x.double
CallFunction( #DLL,"Function", x\a,x\b)
do that for all double arguments.
Post Reply