CSng
The CSng function will convert an ASP variant value into
a single-precision floating point number. These numbers range in
value from -3.402823E38 to -1.401298E-45 for negative numbers and
from 1.401298E-45 to 3.402823E38 for positive numbers.
It is possible that this conversion process will generate a runtime
error. For this reason, you may wish to encapsulate your conversion
call with an error handler as shown in the example below:
Dim sValue Dim fValue
sValue ="324123" On Error Resume Next fValue = CSng(sValue) If Err.Number <> 0 Then Response.Write "An Error occurred converting to single: " & sValue End If
|
 |

|