Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Bit-fiddling
Message
De
26/02/1998 15:49:42
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Bit-fiddling
Divers
Thread ID:
00081526
Message ID:
00081526
Vues:
54
Could someone convert the following lines to foxpro code:

short tsht;
float tmp,cr,cpc;
uchar rbuf[10];

/* calculate the temperature */
tsht = rbuf[0];
if (rbuf[1] & 0x01)
tsht |= -256;
tmp = (float)(tsht/2);
cr = rbuf[6];
cpc = rbuf[7];
if (rbuf[7] == 0)
return 0;
else
tmp = tmp - (float)0.25 + (cpc - cr)/cpc;

Thanks in advance

Werner Vesteraas
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform