Link to home
Start Free TrialLog in
Avatar of Niemand
Niemand

asked on

What is the number sign (#) after a number?

I see a lot of 10#, 0#, etc., in VB code.  For example, Log(10#).  What does the postfixed "#" sign mean?
Avatar of Dabas
Dabas
Flag of Australia image

Hi Niemand,
From VB Help:

Double Data Type
     

Double (double-precision floating-point) variables are stored as IEEE 64-bit (8-byte) floating-point numbers ranging in value from -1.79769313486231E308 to -4.94065645841247E-324 for negative values and from 4.94065645841247E-324 to 1.79769313486232E308 for positive values. The type-declaration character for Double is the number sign (#).



Dabas
Avatar of Niemand
Niemand

ASKER

Dabas,

I've read that under VB Help.  It doesn't seem relevant.  I'm not declaring any variables.  The number sign "#" comes right after a number.  In Log(10#), the number "10" is not a variable, is it?  In a line like:

Item = 0#

The number "0" is not a variable.
ASKER CERTIFIED SOLUTION
Avatar of Dabas
Dabas
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mike Tomlinson
You mostly see declarations like that where Option Explicit is not being used.  As Dabas has pointed out, the value or variable will be implicitly declared depending upon the character postfixed to it.

Idle_Mind