Hardware manual
Commands and Functions R-V Impact Reference Guide
Datalogic Automation Inc. 5-24
REM loop body
Until expression
REPLACE ()
The syntax of this function is
REPLACE (base_string, search_string, replace_string [,number_of_replaces]
[,position]).
The first argument (base_string) is the string to search.
The second argument (search_string) is the string to find.
The third argument (replace_string) is the string to use as replacement.
The fourth argument (number_of_replaces - optional) is the number of replaces to do. If this argument is
missing, then all occurrences of the search_string is replaced.
The fifth argument (position - optional) is the starting character position of the replacement. If this argument
is missing, then the operation starts at the string beginning.
Example:
var_string = replace ("newxtringx","x","s") yields
var_string = newstrings
RESUME
If this function is called, when an error occurs the program will try to continue execution. If the argument is
zero it will try to execute the same statement again. If the argument is "next," it will try execute the next
statement. If the argument is a statement label, it will try to execute the statement at that label. Examples:
RESUME NEXT
RESUME mylabel
RETURN
This command causes a return from a GOSUB command. Execution continues at the statement following
the GOSUB command when the subroutine returns. Example:
GOSUB mysub
REM When the return in mysub is executed, the program executes
REM the following line
x = 3
REM more code goes here
END
mysub:
REM mysub subroutine code is here
RETURN
RIGHT()
The syntax of this function is
RIGHT (string,length)
The first argument is the string to extract. The second argument is the number of characters to put into the
result. Example:
var_string = RIGHT("This string",4) yields var_string = ring