Val2

Converts anything into an integer
I used the function VAL() a lot, it is in VB6 and VBA inside Excel.
But in CLassic ASP, there is no equivelant to it, so I thought it is time for me to have one.
Here is Val2(), an equivalent to VAL() in Classic ASP

Function Val2(AnyString)
 Rett      = 0
 If AnyString > "" Then
  If IsNumeric(AnyString) Then
   Rett    = Cint(AnyString)
  End If
 End If
 Val2      = Rett
End Function

AnyString

Views 900 Downloads 346

'Val', 'Val()', 'Value', 'convert', 'change', 'replace', 'isnumeric', 'null', 'null string', 'cint', 'clng'

ANmarAmdeen
520
Texts + Strings Classic ASP
Revisions

v1.0