omron — $DECODE string function

$DECODE string function $DECODE string function Syntax $DECODE ($string_var, string_exp, mode ) Function Extract part of a string as delimited by given break characters. Usage Considerations $DECODE modifies the input $string_var variable as well as returning a string value. The test for break characters is always performed without regard for the case of the characters in the input string. The break characters are treated as individual characters, independent of the other characters in the string that defines them. Parameters $string_ var String variable that contains the string to be scanned.

After the function is processed, this variable will contain the portion of the original string that was not returned as the function value. NOTE: This parameter is modified by the function and cannot be specified as a string constant or expression. If the program causes the same variable to receive the function value, the variable will end up containing the value returned by the function. string_exp String constant, variable, or expression that defines the individual break characters, which are to be considered as separating the substrings of interest in the input string value.

(The order of the characters in this string has no effect on the function operation.) mode Optional real value, variable, or expression that controls the operation performed by the function. Mode values are -3, -2, 0, and 1. If the mode is negative or zero, or is omitted, characters up to the first break character are removed from the input string and returned as the output of the function. If the mode is greater than zero, characters up to the first non break character are removed from the input string and returned as the eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 149