Hardware manual

General Language Format Impact Reference Guide
Datalogic Automation Inc. 5-2
To modify text
1. Select the desired text, then type the new text.
To check the validity of your Basic code
1. Click the Compile button.
2. Any errors are displayed in the Editor window.
Comments
You can make your programs more readable by leaving blank lines between statements, and adding explan-
atory comment lines.
You can indicate comment lines in one of three ways:
1. Start the line with the letters REM followed by one or more spaces. The spaces after REM are impor-
tant. If you forget them, the Basic interpreter will interpret your comment as a variable and may display
an error message. (See “REM” on page 5-23)
2. Start the line with an apostrophe (‘) character.
3. Start the first line of a multi-line comment with an apostrophe followed by three double-quote marks.
The ending line of the multi-line comment must begin with three double-quote marks. Example:
’""" This is the first comment line
This is the second comment line
""" This is the ending comment line
You cannot put a comment at the end of a statement. Examples:
‘This is a comment line
REM This is also a comment line
count = 1 REM This is an illegal comment after a statement
Error Messages
If you use incorrect syntax for a command, or enter something that the Basic interpreter doesn’t understand,
an error message is displayed at the bottom of the Editor Window. The message will list the offending state-
ment’s line number and a brief explanation of the error.
General Language Format
Impact Basic is a Basic language and it has the same format as other Basic languages. Some advanced func-
tions and commands are not implemented because they are not used.
In Impact Basic, a Basic program is considered to be all the statements contained in one Basic tool. Basic
statements are line oriented and are made up of commands, functions, and assignments. Each statement con-
sists of one line and statements are executed sequentially, based on the program flow.
Variables
Variables are used to store values. Variable names can start with alpha characters, an underscore, a dollar
sign, or a colon. They may also contain numbers starting with the second character. The name cannot con-
tain spaces, the last character cannot be a colon, and you cannot use reserved words.
Sample Error Message