hmmmmmm...
I think that the compiler misunderstood.
He is trying to make negative the absolute value, which is an overflow for
Long.
In this case you should use the hexadecimal literal 0x8000000000000000
(&H8000000000000000 in VB)
---
Rafael Pivato
"Brian" <no****@prairie.lakes.com> escreveu na mensagem
news:vo************@corp.supernews.com...
Nope, already tried to append the L.
"Rafael Pivato" <rp*****@cpovo.net> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
"Brian" <no****@prairie.lakes.com> escreveu na mensagem
news:vo************@corp.supernews.com... Look at the code below. All three variables are initialized to the
same value, -9223372036854775808. The first two work OK but the third
throws a overflow error. Why? (Framework v1.0.3705)
'-- OK, no overflow
Dim i as Long = Long.MinValue
Dim k as Long = CLng(-2 ^ 63)
'-- Overflow error
Dim m as Long = -9223372036854775808
You should add the literal type charecter 'L'.
Something like -9223372036854775808L
----
Rafael Pivato