Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retrieve byte from string?
Message
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Retrieve byte from string?
Miscellaneous
Thread ID:
01291798
Message ID:
01291798
Views:
56
If I have a string created as follows...
x=CHR(255)+CHR(85)+CHR(0)+CHR(16)+CHR(0)+CHR(0)
What is the fastest way to retrieve a specified byte as an integer?
bytenum=2
? asc(substr(x,bytenum,1)) 
...is all I could think of.


FYI - This is a value returned from an api call. In vb I could use a struct but as far as I know vfp has nothing like that.
Next
Reply
Map
View

Click here to load this message in the networking platform