Appearance
IsNumber
Declaration
Function IsNumber( const S : string) : Boolean
Example
pascal
procedure OnMapEvent(var Value:Variant);
begin
Value := IsNumber('abc123'); //returns false
Value := IsNumber('123'); //returns true.
Value := IsNumber('$123.00'); //returns false.
end;Description
Returns True or False depending on whether the input string contains only numeric characters or not. If this function returns True then you can safely use a Conversion function on it to turn it into a numeric data type.
Refer IsDigit for a function that checks only the first character to see if it is a digit. Refer to IsCurrencyNumber for a function that checks if the string contains a number in currency format. This function allows currency format symbols like $,.