Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Number to binary to number
Message
 
À
14/06/2006 03:34:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP1
Divers
Thread ID:
01128906
Message ID:
01128909
Vues:
21
Hi Jos,
lcPom="00000000000000011110001001000000"
liLen=LEN(lcPom)-1
liy=0
FOR lii=liLen TO 0 STEP -1
    IF SUBSTR(lcPom,lii+1,1)="1"
       liy=BITSET(liy,liLen-lii)
    ENDIF
next
?liy
MartinJ
>Hi All
>
>I have written my own number to binary to number function but I thought I would ask if there was an easier method. I am looking to take number eg 123456 and convert that into a binary string like "00000000000000011110001001000000". Is there a fast way to do this num to char-bin and back to number?
"Navision is evil that needs to be erazed... to the ground"

Jabber: gorila@dione.zcu.cz
Jabber? Jabbim
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform