Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bit-fiddling
Message
From
26/02/1998 15:49:42
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Bit-fiddling
Miscellaneous
Thread ID:
00081526
Message ID:
00081526
Views:
50
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
Next
Reply
Map
View

Click here to load this message in the networking platform