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

rtecall("alalnum") function

A RAD function that verifies that a string contains only alphanumeric characters. The first character must be alphabetic. The remaining characters must be alphabetic, numeric, or one of the non-alphabetic characters provided.

Function

rtecall("alalnum")

Format

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

Parameters

The following parameters are valid for the rtecall("alalnum") 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 "alalnum"
$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-alphanumeric 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("alalnum", $L.return.code, $L.str, $L.chars)

Results:

  • $L.success.flag is true when name in $L.file="my.name".
  • $L.success.flag is true when name in $L.file="my_name".
  • $L.success.flag is false when name in $L.file="my name".