Please, someone could try this with gcc 4.4.0 in Linux.
Is only for historical reasons and curiosity :)
What is the output, of course if it works?
My output in Win with 3.4.5 is .-
MinGW GNU C 3.4.5 (32-bit) => ndbRes == -0.0000000000000002 ndbRes == 0 is .F.
error: decimal floating point not supported for this target.
--
Xavi
Procedure Main()
? Test_C_Compiler_W()
? Test_C_Compiler_X()
Wait
return
#pragma BEGINDUMP
#include "hbapi.h"
HB_FUNC( TEST_C_COMPILER_W )
{
char cMsg[ 4096 ];
double ndbRes;
ndbRes = 3.05;
ndbRes -= 1.55;
ndbRes -= 1.50;
/* -----
0.00 */
snprintf( cMsg, sizeof(cMsg), "%s => ndbRes == %.16f ndbRes == 0 is %s \n",
hb_verCompiler(), ndbRes, (ndbRes == 0 ? ".T." : ".F.") );
hb_retc( cMsg );
}
HB_FUNC( TEST_C_COMPILER_X )
{
char cMsg[ 4096 ];
_Decimal64 decRes;
decRes = 3.05dd;
decRes -= 1.55dd;
decRes -= 1.50dd;
/* -----
0.00 */
snprintf( cMsg, sizeof(cMsg), "%s => decRes == %.16DFf decRes == 0 is %s \n",
hb_verCompiler(), decRes, (decRes == 0 ? ".T." : ".F.") );
hb_retc( cMsg );
}
#pragma ENDDUMP
_______________________________________________
Harbour mailing list
[email protected]
http://lists.harbour-project.org/mailman/listinfo/harbour