Hi,
I'm using vc++ 2008 express.
I cant get a correct float result.
After searching for solutions I have this:
#include "stdafx.h"
#include "t1.h" //name of dll
#include "windef.h"
#define DLLEXPORT extern "C" __declspec(dllexport)
// division function
DLLEXPORT DWORD Div ( float A, float B )
{
float result;
result=A/B;
return *(DWORD*) &result;
}
It compiles fine and the string tables are in there okay.
DBP accepts it as function like this:
a#=10.0
b#=5.0
print div(a#,b#)
but the result equals 1073741824.
NOTE: All the integer function I've done work fine.
Can someone please help with the floats?
regards,
miki.
Sorry, It's C++. Not ASP.
sorted... changed my LLL to FFF
in the end