Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BitAnd() limitation?
Message
De
12/08/2004 13:15:45
 
 
À
12/08/2004 12:52:21
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00931430
Message ID:
00932826
Vues:
23
Thanks for your help again. i still have a problem (sorry). for the 1st 31 bits i get the error "missing expression". the rest evaluates correctly. i'll see if i can figure out the problem.


>Now you can see the 52 bit.
>
>
>CLEAR
>
>*** 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...'
>? TRANSFORM(m.x*2^-32,"@R0")
>FOR k=0 TO 52
>	IF Test(m.x,m.k)
>  		?? TRANSFORM(m.k,"@R < 99 >")
>  	ENDIF
>NEXT
>
>FUNCTION Test
>LPARA	MasterBit, TestBit
>
>#IF VERSION(5)<900
>	RETURN BITTEST(EVALUATE(TRANSFORM(m.MasterBit*2^MIN(0,32*SIGN(31-m.TestBit)),"@0")), m.TestBit%32)
>#ELSE
>	RETURN BITTEST(m.MasterBit*2^MIN(0,32*SIGN(31-m.TestBit)), m.TestBit%32)
>#ENDIF
>
>
>To use EVAL(TRANSFORM( is demential,
>but i do not have time in order to find one better solution.
>
>Fabio
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform