Jump to navigation Jump to search
A signed _BYTE variable can hold variable values from -128 to 127 (one byte or 8 _BITs).
- _UNSIGNED _BYTEs can hold values from 0 to 255. _UNSIGNED expands the range of positive values.
- Can be defined in a QB64 _DEFINE statement using a starting letter range of variable names.
- Also can be used in subroutine parameter AS variable definitions.
Example: How negative assignments affect the _UNSIGNED value returned by a byte(8 bits).
- 00000001 - unsigned & signed are both 1
- 01111111 - unsigned & signed are both 127
- 11111111 - unsigned is 255 but signed is -1
- 11111110 - unsigned is 254 but signed is -2
- 11111101 - unsigned is 253 but signed is -3