WANTS TO MAKE SOFTWARE WITHOUT KNOWLEDGE OF ASP? CLICK HERE
The CDbl function converts an expression to type Double. Its parameter
is expression which describes any valid expression. You can determine
the expression subtype by using the function VarType( ). In general,
you can document your code using the subtype conversion functions
to show that the result of some operation should be expressed as a
particular data type rather than the default data type. For example,
use CDbl or CSng to force double-precision or single-precision arithmetic
in cases where currency or integer arithmetic normally would occur.
Use the CDbl function to provide internationally aware conversions
from any other data type to a Double subtype. For example, different
decimal separators and thousands separators are properly recognized
depending on the locale setting of your system.
The Syntax of CDbl function is :-
Example#1 :-
Code :-
dim a
a=134.345
document.write(CDbl(a))
Output :-
134.345 |
Example#2 :-
Code :-
dim a
a=14111111113353355.345455
document.write(CDbl(a))
Output:-
1.41111111133534E+16 |
Example#3 :-
Converted values can range from:-
-1.79769313486232E308 to -4.94065645841247E-324 for negative
values and 4.94065645841247E-324 to 1.79769313486232E308 for
positive values.
Code :-
<% anynumber=1234.5 %>
<% =CDbl(anynumber) %>
Output :-
1234.5
|
|