Symbol # after numbers

M

Marcus

Hi, I found a code that uses the symbol # after some numbers, what is the
function of this?

This is part of the code

If N < 2 Or beta <= 0# Or beta >= 1# Or Alpha <= 0# Or Alpha >= 1# Then
Tol2 = CDbl(CVErr(xlErrValue))
Exit Function
End If
c = 1# / Sqr(2# * 3.14159265358979)

Thanks.
 
R

Ryan H

That signifies significant digits. For example, if you type beta >= 1.00000,
VBA will automatically revice the syntax to bets >= 1#, but if you type beta
= 1, VBA leaves that syntax alone. Try it yourself. Hope this helps! If
so, let me know, click "YES" below.
 
B

Bernd P

Hello,

Its just telling VBA that the constant is of type double so it does
not need to get casted (VBA will never get irritated :)

# --> Double
% --> Integer
& --> Long
@ --> Currency
! --> Single
$ --> String

[found in the web]

Regards,
Bernd
 
Top