CInt
The CInt function will convert an ASP variant value into
an integer value. An integer is a whole number in the range
-32768 to 32767.
It is possible that an error will occur when attempting to convert
a value into an integer. You may trap for this error using error
handling as shown below:
Dim sValue Dim nValue
sValue ="324123" On Error Resume Next nValue = CInt(sValue) If Err.Number <> 0 Then Response.Write "An Error occurred converting to integer: " & sValue End If
|