Michael Clease
03-06-2010, 10:18
I was converting some C code and hoping I was converting the following code correctly can someone confirm.
{
int n;
for( n = 32; !(x & 0x80000000) && (n > 0); -- n ) x <<= 1;
return n;
}
Local n As Integer Value N = 32
While Not ( ANDB(x, &h80000000)) And (n > 0)
Decr n
SHIFT LEFT x,1
Wend
Function = N
Thanks
Mike
{
int n;
for( n = 32; !(x & 0x80000000) && (n > 0); -- n ) x <<= 1;
return n;
}
Local n As Integer Value N = 32
While Not ( ANDB(x, &h80000000)) And (n > 0)
Decr n
SHIFT LEFT x,1
Wend
Function = N
Thanks
Mike