Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
BitAnd() limitation?
Message
From
12/08/2004 11:30:15
 
 
To
12/08/2004 11:19:53
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00931430
Message ID:
00932766
Views:
19
Now I am worried. it still returns .f. on my pc. just copyed and paste and run. the numbers go up until 31. if i understand your code correctly they should go until 52.

i work on Vfp 6 SP5, Windows XP (not sp2 yet), Intel P4 1.6 GHz. anything what stands out in difference with yours?

how about anyone else, can you test this and let us know what you come up with please?


UPDATE: i just tested with Vfp9 Beta on the same machine - the results are the same.


>It return .T. on my PC.
>
>this is a full test:
>
>CLEAR
>****** *** the following returns .f. (not correct, should be .t.)
>** THIS RETURN .T.
>?Test(;
>	2^1 + ;
>	2^2 + ;
>	2^3 + ;
>	2^4 + ;
>	2^5 + ;
>	2^6 + ;
>	2^7 + ;
>	2^8 + ;
>	2^9 + ;
>	2^10 + ;
>	2^11 + ;
>	2^12 + ;
>	2^13 + ;
>	2^14 + ;
>	2^15 + ;
>	2^16 + ;
>	2^17 + ;
>	2^18 + ;
>	2^19 + ;
>	2^20 + ;
>	2^21 + ;
>	2^22 + ;
>	2^23 + ;
>	2^24 + ;
>	2^25 + ;
>	2^26 + ;
>	2^27 + ;
>	2^28 + ;
>	2^29 + ;
>	2^30 + ;
>	2^31 + ;
>	2^32 + ;
>	2^33, ;
>	32)
>
>*** FULL TEST
>x=0
>? 'zero'
>?
>FOR k=0 TO 52
>	IF Test(m.x,m.k)
>  		?? TRANSFORM(m.k,"@R < 99 >")
>  	ENDIF
>NEXT
>* PREPARE A FULL 53 BITS SET TO 1
>FOR k=0 TO 52
>	x=m.x+2^m.k
>NEXT
>? '111...'
>?
>FOR k=0 TO 52
>	IF Test(m.x,m.k)
>  		?? TRANSFORM(m.k,"@R < 99 >")
>  	ENDIF
>NEXT
>
>
>FUNCTION Test
>LPARA	MasterBit, TestBit
>RETURN BITTEST(m.MasterBit*2^MIN(0,32*SIGN(31-m.TestBit)), m.TestBit%32)
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform