Click or drag to resize

IsNumeric Function

X#
Determine if a value is a numeric.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.19
Syntax
 FUNCTION IsNumeric(
	uValue AS USUAL
) AS LOGIC
Request Example View Source

Parameters

uValue
Type: Usual
The value to examine.

Return Value

Type: Logic
TRUE if the value is a numeric; otherwise, FALSE.

Return Value

Type: Logic
TRUE if the value is a LONG, FLOAT, IN64 or DECIMAL data type; otherwise, FALSE.
Remarks
IsNumeric() is equivalent to UsualType(uValue = LONG .OR. UsualType(uValue = FLOAT.
Examples
This example uses IsNumeric() to determine the formatting to be used:
X#
1IF IsNumeric(uValue)
2    ? Str3(uValue, 7, 2)
3ELSE
4    ? uValue
5ENDIF
See Also