Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Why does VB add a # on the end?

Status
Not open for further replies.

wadey

Programmer
Jun 6, 2006
54
0
0
GB
why does VB add # on to the end of this line? :-

dim lngVar as long

lngVar = 999999999999999#

Please do not tell me the number is to big for a long, because I already know this. I'm merely just curious what the # does in this situation
 
The # indicates that vb is going to treat the literal number "999999999999999" as if it were a Double.

 
The pound sign indicates that your value has a data type of Double.

For example...

[tt][blue]
Dim lngVar As [!]Variant[/!]

lngVar = 999999999999999#

MsgBox TypeName(lngVar) & ": " & CStr(lngVar)
[/blue][/tt]


-George

Strong and bitter words indicate a weak cause. - Fortune cookie wisdom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top