Re: question(s) about declaring variables
- From: "Larry Serflaten" <serflaten@xxxxxxxxxxxxxx>
- Date: Mon, 27 Jun 2005 07:07:27 -0500
"Michael C" <mculley@xxxxxxxxxxxxxxxxxxxxxx> wrote
> "Larry Serflaten" <serflaten@xxxxxxxxxxxxxx> wrote
> > Because of that, those character type identifiers are needed for more
> > control, not backward compatability.
>
> No they're not, you can just use something like this:
>
> Dim i As Long
> i = 650
> Debug.Print i * CLng(1000)
Now try it like this:
Debug.Print &HDAFF&
Debug.Print CLng(&HDAFF)
If using CLng was an exact replacement, those two would print the
same value, but they don't....
The point is you get a Long at compile time using the type definition
character, where using the function still involves VB assigning the
value to whatever type it deems correct, at compile time. To force
VB to use the type you want, those characters are still needed.
LFS
.
- Follow-Ups:
- Re: question(s) about declaring variables
- From: Michael C
- Re: question(s) about declaring variables
- References:
- question(s) about declaring variables
- From: Steve Easton
- Re: question(s) about declaring variables
- From: Mike D Sutton
- Re: question(s) about declaring variables
- From: Steve Easton
- Re: question(s) about declaring variables
- From: Mike D Sutton
- Re: question(s) about declaring variables
- From: Larry Serflaten
- Re: question(s) about declaring variables
- From: Michael C
- question(s) about declaring variables
- Prev by Date: Re: question(s) about declaring variables
- Next by Date: Re: question(s) about declaring variables
- Previous by thread: Re: question(s) about declaring variables
- Next by thread: Re: question(s) about declaring variables
- Index(es):
Relevant Pages
|