Android Question How do I read 4 bytes from a file ...

grafsoft

Well-Known Member
Licensed User
Longtime User
... that represent an unsigned integer into an integer variable?
Thanks
Peter
 
If you read the buffer with bc.intsfrombytes then you get the following:
1. for number from 0 to 2,147,483,647 - the same as the original Uint
2. if you get negative number - then add it to 4,294,967,295 (with the sign) so the result is less then 4,294,967,295.

Note - this is true for all B4X except B4R. See this (which is for B4R):
https://www.b4x.com/android/forum/threads/data-types.65666/
 
Last edited:
Upvote 0
Back
Top