Break on
$uid = "12345"
If IsNumeric($uid) = 1
? "UID is numeric."
Else
? "UID is NOT numeric."
EndIf
;Function IsNumeric()
;
;Author: apronk
;
;Action:
; Determines whether an expression is a valid numeric type.
;
;Syntax:
; IsNumeric($strInput)
;
;Version:
; 1.0 December 11th 2009.
; Initial post.
;
;Parameters:
; $strInput - Required.
; The input string to evaluate.
;
;Returns:
; 1 if the input is Numeric
; 0 if the input is NOT Numeric.
;
;Dependencies
; No known dependencies
;
;KiXtart:
; Developed and tested KiXtart 4.61 and Windows 7 Ultimate.
;
;Example(s):
; Break on
; $rc = IsNumeric("2000")
; ? $rc
;
;Code:
Function IsNumeric($strInput)
Dim $sc, $rc
$sc = CreateObject("ScriptControl")
$sc.Language = "VBScript"
$rc = $sc.Eval('IsNumeric("' + $strInput + '")')
If $rc = -1
$IsNumeric = 1
Else
$IsNumeric = 0
EndIf
EndFunction