Develop > Programming > System Language reference > List: rtecalls > rtecall("isnumeric") function

rtecall("isnumeric") function

A RAD function that verifies that a string contains only numeric characters, or only numeric characters and the provided non-numeric characters.

Function

rtecall("isnumeric")

Format

$L.success.flag= rtecall ($L.fnc.name, $L.return.code, $L.str, $L.chars)

Parameters

The following parameters are valid for the rtecall("isnumeric") function:

Parameter Data type Description
$L.success.flg Logical Indicates if the function was successful.
$L.fnc.name String Name of the sub-function to call, in this case "isnumeric".
$L.return.code Number Provides a more detailed return code.
$L.str String The string to be checked.
$L.chars String An optional comma-delimited string of non-numeric characters to allow.

Factors

If the $L.success.flg is false, the function failed. If it is true, the function succeeded.

Example

 $L.success.flag=true
 $L.return.code=0
 $L.str=name in $L.file
 $L.chars="-,+,*,/,%,$"
 $L.success.flag=rtecall("isnumeric", $L.return.code, $L.str, $L.chars)

Results:

  • When name in $L.file="B1B", $L.success.flag is false.
  • When name in $L.file="Bob", $L.success.flag is false.
  • When name in $L.file="36", $L.success.flag is true.