Hardware manual

Commands and Functions E-H Impact Reference Guide
Datalogic Automation Inc. 5-12
Loop Until expression
Do
REM loop body
Loop While expression
Do Until
This construct repeats the loop body until the expression is True. The expression is evaluated before entering
the loop so the loop is not executed if the expression is already True.
Do Until expression
REM loop body
Loop
Do While
This construct repeats the loop body while the expression is True. The expression is evaluated before enter-
ing the loop so the loop is not executed if the expression is already False.
Do While expression
REM loop body
Loop
Commands and Functions E-H
END SUB
This command declares the end of 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.This command is unnecessary at the end of
the main section of code in the VPM Basic tool. Example:
SUB MySub(Var1,Var2, Var3)
REM subroutine code goes here
END SUB
EOF()
(CPM Only) This function returns True if the end of the file currently being read has been reached. The
argument is an open file number. This example assigns the value True to the variable end when the end of
file 1 is reached. Example:
end = eof(1)
ERROR()
This function returns the error code for the most recent error that occurred. This example would assign the
error code to the variable errcode. Example:
errcode = ERROR()
ERROR n
This command causes the Basic tool to fail with the error code number "n." Example: