Format of Programs Format of Programs This section presents the format that eV+ programs must follow. The format of the individual lines is described, followed by the overall organization of programs. This information applies to all programs regardless of their type or intended use. Program Lines Each line or step of a program is interpreted by the eV+ system as a program instruction. The general format of a eV+ program step is: step_number step_label operation ;Comment Each item is optional and is described in detail below. Step Number Each step within a program is automatically assigned a step number.
Steps are numbered consecutively, and the numbers are automatically adjusted whenever steps are inserted or deleted. Although you will never enter step numbers into programs, you will see them displayed by the eV+ system in several situations. Step numbers are also often referenced as line numbers. Step Label Because step numbers change as a program evolves, they are not useful for identifying steps for program-controlled branching. Therefore, program steps can contain a step label. A step label is a programmer- specified integer (0 to 65535) that is placed at the start of a program line to be referenced elsewhere in the program (used with GOTO statements).
Operation The operation portion of each step must be a valid eV+ language keyword and may contain parameters and additional keywords. The eV+ Language Reference Guide gives detailed descriptions of all the keywords recognized by eV+. Other instructions may be recognized if your system includes optional features. Comment The semicolon character is used to indicate that the remainder of a program line is comment information to be ignored by eV+. When all the elements of a program step are omitted, a blank line results. Blank program lines are acceptable in eV+ programs. Blank lines are often useful to space out program steps to make them easier to read.
When only the comment element of a program step is present, the step is called a comment line . Comments are useful to describe what the program does and how it interacts with other programs. Use comments to describe and explain the intent of the sections of the programs. Such internal documentation will make it easier to modify and debug programs. eV+Language User's Guide, v2.x, 18318-000 Rev A Page 22