04-30-2004, 11:07 AM
I believe the Qbasic integer (num%) is a 2 byte value. How can I define a variable and be sure it is no larger than one byte.
defining 1 byte variables
|
04-30-2004, 11:07 AM
I believe the Qbasic integer (num%) is a 2 byte value. How can I define a variable and be sure it is no larger than one byte.
04-30-2004, 12:21 PM
Code: dim byte as string * 1
esus saves.... Passes to Moses, shoots, he scores!
04-30-2004, 06:07 PM
QBASIC is really quite evil for not giving an intrinsic one-byte datatype (instead we have to masquerade it as a string-var).
However, this is what I use when I want access to single bytes. You're right to say that the INTEGER data type is two bytes. So, we access single bytes by directly accessing memory. Code: DIM Byte AS INTEGER
f only life let you press CTRL-Z.
-------------------------------------- Freebasic is like QB, except it doesn't suck. |
« Next Oldest | Next Newest »
|