(Original) a value type of judgment string

xiaoxiao2021-03-06  42

Support Analyzing return any numeric type data: Function GetNumType (sVal) Dim sTypeIf Not IsNumeric (sVal) Then GetNumType = "Unknow" Exit FunctionEnd IfExecute "sType = TypeName (" & sVal & ")" GetNumType = sTypeEnd Function Test: Response.Write GetNumType ( "9999") 'returns: IntegerResponse.Write GetNumType ( "999999999")' returns: LongResponse.Write GetNumType ( "99999999999999") 'returns: DoubleResponse.Write GetNumType ( "asdfasd")' returns: Unknow

转载请注明原文地址:https://www.9cbs.com/read-118477.html

New Post(0)