datAdrenaline
AWF VIP
- Local time
- Today, 12:25
- Joined
- Jun 23, 2008
- Messages
- 697
Hello dcb ...
>> Access sees Cint(True) as -1
But a Boolean remains a bool no matter what..
Thus
Cbyte(CBool(Cint(True))) = 255 <<
I am not sure of the point you are trying to make.
Coverting a boolean of True, which is supposedly returns a value of -1, *should* cause the CByte() function to overflow, just as the CByte(-1) did, but instead, the CByte() returned the fact that the right most 8 bits of the 16bit boolean value of True were set to 1, thus the return value of 255 since the Byte datatype is unsigned.
>> Access sees Cint(True) as -1
But a Boolean remains a bool no matter what..
Thus
Cbyte(CBool(Cint(True))) = 255 <<
I am not sure of the point you are trying to make.
Coverting a boolean of True, which is supposedly returns a value of -1, *should* cause the CByte() function to overflow, just as the CByte(-1) did, but instead, the CByte() returned the fact that the right most 8 bits of the 16bit boolean value of True were set to 1, thus the return value of 255 since the Byte datatype is unsigned.