Did you know that...
.... that when you execute CByte(True) you will get... 255(!!!) instead
of -1??? I have discovered this by chance when I was writing code like
this:
aByteVariable = aByteVariable -
CByte(aFunctionThatReturnsBoolean(anArgument) )
to get rid of the If-Then-Else clause. Thank God I was using a byte
variable and got an overflow error
for if I had used a long variable, I would probably never have
discovered the cause of the error...
Well, I'd have eventually but it would have taken more time, I
presume.
Darek
ps. Always step through your code line by line and check (almost)
every possible scenario.
If you do not do this, you can be very much taken by surprise :)
|