-
Try these examples in immediate window:
print 32766 + 1
print 32766 + 2
print 32768 + 1
The second one causes overflow!
Code:
a = 256 * 256 'This does not work.
b& = 256& * 256& 'This works cuz i set them to long
c = 256@ * 256 'This works too
c = 256 * 256@ 'This works too
'This doesn't work and I can't set them as currency(@). And the variant thinks they are integers so it gets an overflow error!
d = Chr(255)
e = Asc(d) * Asc(d)
Why does the variant act like this? I thought Variant was more flexible. And how do i solve this e = Asc(d) * Asc(d) without using new variables?
-
Why can't you convert to currency?
Code:
d = Chr(255)
e = CCur(Asc(d)) * Asc(d)
-
Ok, I found out another way:
e = 1@ * Asc(d) * Asc(d)