User`s guide
The example programs in this manual, and the utility programs provided by Adept with your
system, provide examples of programming format and style. Notice that Adept programs
contain numerous comments and blank lines.
When program lines are entered, extra spaces can be entered between any elements in the
line. The V+ editors add or delete spaces in program lines to make them conform with the
standard spacing. The editors also automatically format the lines to uppercase for all
keywords and lowercase for all user-defined names.
When you complete a program line (by entering a carriage return, moving off a line, or exiting
the editor), the editor checks the syntax of the line. If the line cannot be executed, an error
message is output.
Certain control structure errors are not checked until you exit from the editor (or change to
editing a different program). If an error is detected at that time, an error message is displayed
and the program is marked as not executable. (Error checking stops at that point in the
program. Thus, only one control structure error at a time can be detected.)
Program Organization
The first step of every V+ program must be a .PROGRAM instruction. This instruction names
the program, defines any arguments it receives or returns, and has the format:
.PROGRAM program_name(parameter_list) ;Comment
The program name is required, but the parameter list and comment are optional.
After the .PROGRAM line, there are only two restrictions on the order of other instructions in a
program.
l AUTO, LOCAL, or GLOBAL instructions must precede any executable program
instructions. Only comment lines, blank lines, and other AUTO, LOCAL, or GLOBAL
instructions are permitted between the .PROGRAM step and an AUTO, LOCAL, or
GLOBAL instruction.
l The end of a program is marked by a line beginning with .END. The V+ editors
automatically add (but do not display) this line at the end of a program.
1
Program Variables
V+ uses three classes of variables: GLOBAL, LOCAL, and AUTO. These are described in detail
in Variable Classes on page 107.
1
The .PROGRAM and .END lines are automatically entered by the Adept-supplied V+ program
editors. If you use another text editor for transfer to a V+ system, you MUST enter these two
lines. In general, any editor that produces unformatted ASCII files can be used for
programming. See the FORMAT command for details on creating floppy disks compatible with
other operating systems.
Format of Programs
V+Language User's Guide, v17.0
Page 36










