Hardware manual
Impact Reference Guide Commands and Functions R-V
5-27 Datalogic Automation Inc.
This command stops program execution. No further commands are executed. Example:
STOP
STR()
This function converts a number to a string. This conversion is done automatically, but you can use this
function to insure that a variable is interpreted as a string. Example:
a = 6
var_string = STR(a) yields var_string = 6
is the same as
a = 6
var_string = a yields var_string = 6
STRING()
The syntax of this function is
STRING (n,code)
The first argument (n) is the string length to create. The second argument (code) is the character code to use
to create the string.
If the second argument is a string, then the first character of the string is used to fill the result. Otherwise the
argument is converted to an integer and the ASCII code is used.
Examples: (the ASCII code 98 is the letter "b")
new_string = STRING (16,"a") yields new_string = aaaaaaaaaaaaaaaa
new_string = STRING (16,98) yields new_string = bbbbbbbbbbbbbbbb
STRREVERSE()
This function reverses the string argument. Example:
var_string = STRREVERSE ("backwards") yields var_string = sdrawkcab
SUB()
The syntax of this command is
SUB sub (a,b,c)
This command declares a subroutine. A subroutine is a piece of code that can be called from the main part of
the code or from a function or another subroutine. Example:
SUB MySub(Var1,Var2, Var3)
REM subroutine code goes here
END SUB
TAN()
This function returns the tangent of the argument. The result is in radians. If the argument is undef, the result
is undef. Example:
x = TAN(1) yields x = 1.557408
TIMEVALUE()