// C functions call from Harbour
//---------------------------------
#pragma BEGINDUMP
#include <hbapi.h>
#include <math.h>
// Bitwise NOT (C Function)
HB_FUNC( C_NOT )
{
long long int nHexadecimal;
long long int nNot;
nHexadecimal = hb_parnll(1);
nNot = ~nHexadecimal;
hb_retnll( nNot );
}
#pragma ENDDUMP
//---------------------------------
#pragma BEGINDUMP
#include <hbapi.h>
#include <math.h>
// Bitwise AND (C Function)
HB_FUNC( C_AND )
{
long long int nHexadecimal1, nHexadecimal2;
long long int nAnd;
nHexadecimal1 = hb_parnll(1);
nHexadecimal2 = hb_parnll(2);
nAnd = nHexadecimal1 & nHexadecimal2;
hb_retnll( nAnd );
}
#pragma ENDDUMP
//---------------------------------
#pragma BEGINDUMP
#include <hbapi.h>
#include <math.h>
// Bitwise XOR (C Function)
HB_FUNC( C_XOR )
{
long long int nHexadecimal1, nHexadecimal2;
long long int nXor;
nHexadecimal1 = hb_parnll(1);
nHexadecimal2 = hb_parnll(2);
nXor = nHexadecimal1 ^ nHexadecimal2;
hb_retnll( nXor );
}
#pragma ENDDUMP
//-----------------------------------------
#pragma BEGINDUMP
#include <hbapi.h>
#include <math.h>
// Bitwise OR (C Function)
HB_FUNC( C_OR )
{
long long int nHexadecimal1, nHexadecimal2;
long long int nOr;
nHexadecimal1 = hb_parnll(1);
nHexadecimal2 = hb_parnll(2);
nOr = nHexadecimal1 | nHexadecimal2;
hb_retnll( nOr );
}
#pragma ENDDUMP
//---------------------------------
#pragma BEGINDUMP
#include <hbapi.h>
#include <math.h>
HB_FUNC( C_SHIFT_R )
{
long long int nHexadecimal1;
long long int nToShiftR;
long long int nShifted;
nHexadecimal1 = hb_parnll(1);
nToShiftR = hb_parnll(2);
nShifted = nHexadecimal1 >> nToShiftR;
hb_retnll( nShifted );
}
#pragma ENDDUMP
//---------------------------------
#pragma BEGINDUMP
#include <hbapi.h>
#include <math.h>
HB_FUNC( C_SHIFT_L )
{
long long int nHexadecimal1;
long long int nToShiftL;
long long int nShifted;
nHexadecimal1 = hb_parnll(1);
nToShiftL = hb_parnll(2);
nShifted = nHexadecimal1 << nToShiftL;
hb_retnll( nShifted );
}
#pragma ENDDUMP
Return to FiveWin para Harbour/xHarbour
Users browsing this forum: No registered users and 50 guests