Re: Differences between VB6 and VB.Net causing problem
- From: "Larry Serflaten" <serflaten@xxxxxxxxxxxxxx>
- Date: Sat, 18 Oct 2008 05:45:57 -0500
"Bill McCarthy" <Bill@xxxxxxxxxxxxx> wrote
In VB6, True is a 32 bit value with all bits set.
No it is not. It is 16 bit in Vb6. If you don't beleive the documentation
try it yourself:
Private Type Foo
a As Boolean
Take note, I did not say a Boolean is 32 bits, I said True is 32 bits.
I simply inferred it by noticing that True converted to a Long yields
a 32 bit value.
When you stuff True into a Byte, you only gets 8 bits, and into a
Boolean, (or Integer) you get 16. But stuff it into a Long and you
get 32 bits.
In any case the facts refute your statement:
"Oh, and for the record, VB6 and VB.NET do NOT store 0 and -1"
VB6 actually does use -1 as the value for True as shown when
converted to Currency or Decimal types. And, if I conceed True is
just 16 bits, they use -1 again when converting to a Long type.
As for documentation, in VB5, I put the cursor on "True" and hit
F1 to see this:
"The True keyword has a value equal to -1."
So how is it you say VB6 does not store -1 for True? What do
they store???
LFS
.
- Follow-Ups:
- Re: Differences between VB6 and VB.Net causing problem
- From: Bill McCarthy
- Re: Differences between VB6 and VB.Net causing problem
- From: Howard G
- Re: Differences between VB6 and VB.Net causing problem
- References:
- Differences between VB6 and VB.Net causing problem
- From: Howard G
- Re: Differences between VB6 and VB.Net causing problem
- From: Tom Shelton
- Re: Differences between VB6 and VB.Net causing problem
- From: expvb
- Re: Differences between VB6 and VB.Net causing problem
- From: Tom Shelton
- Re: Differences between VB6 and VB.Net causing problem
- From: Bill McCarthy
- Re: Differences between VB6 and VB.Net causing problem
- From: Larry Serflaten
- Re: Differences between VB6 and VB.Net causing problem
- From: Bill McCarthy
- Differences between VB6 and VB.Net causing problem
- Prev by Date: Re: installation of internet explorer 8.0
- Next by Date: Re: Differences between VB6 and VB.Net causing problem
- Previous by thread: Re: Differences between VB6 and VB.Net causing problem
- Next by thread: Re: Differences between VB6 and VB.Net causing problem
- Index(es):
Relevant Pages
|
Loading