.PROGRAM program instruction .PROGRAM program instruction Syntax .PROGRAM program_name( argument_list ) ;comment Function Define the arguments that are passed to a program when it is invoked. Usage Considerations This instruction is inserted automatically by the eV+ editors when a new program is edited. This special instruction must be the first line of every program. The .PROGRAM statement cannot be deleted from a program. Parameters program_name Name of the program in which this instruction is found. argument_list Optional list of variable names, separated by commas.
Each variable can be any one of the data types available with eV+ (belt, precision point, real-value, string, and transformation). Each variable can be a simple variable or an array with all of its indexes left blank. ;comment Optional comment that is displayed when the program is loaded from a disk file and when the DIRECTORY command is processed. (The semicolon [;] should be omitted if no comment is included.) Details The eV+ editors automatically enter a .PROGRAM line when you edit a new program. They also prevent you from deleting the line or changing the program name. You can, however, edit the line to add, delete, or modify the argument list.
(The RENAME monitor command must be used to change the program name.) The variables in the argument list are considered automatic variables for the named program. (See the AUTO instruction.) When a program begins execution (for example, via an EXECUTE command or instruction or a CALL instruction), the arguments in the .PROGRAM instruction are associated with those in the EXECUTE or CALL. This association allows values to be passed between a program and its caller. eV+Language Reference Guide, v2.x, 18319-000 Rev A Page 411