A "proc" is a function that may be executed under the Terminal Monitor. There are two types of procs:
A proc is made known to TAE through the existence of a Proc Definition File (PDF). The parameters for a process are defined in the PDF; the program itself is contained in a separate, executable disk file. The PDF for a procedure contains the parameter definitions followed by a sequence of TCL commands. For both processes and procedures, a PDF also contains (or references) the help information for the proc.
The steps for implementing an application proc under TAE are as follows:
If the proc is a process, write and debug the program and create an executable program file using the host software development utilities. The "TAE Command Language (TCL) Runtime Services, Volume 1: C" and the "TAE Command Language (TCL) Runtime Services, Volume 2: FORTRAN" describe TAE subroutines that are used by application programs.
Using the Graphical Capabilities of TAE Plus
TAE Plus is designed to exploit the capabilities of graphics workstations by providing a set of tools and application-callable routines (the Window Programming Tools package) that support the development of graphical, point-and-click type user interfaces. These capabilities are available to applications running or not running under the Terminal Monitor.
Graphical applications may be initiated using the same mechanisms as any TAE applications, and initial parameters may be supplied through standard PDFs. See the"TAE Plus Overview" and the "TAE Plus User Interface Developer's Guide" and "TAE Plus Programmer's Manual" for more information.
A PDF is a text file created using one of the host's text editors. PDFs are required for process definition, for procedure definition, and for the definition of global variables ("global" PDFs).
The structure of a process PDF is:
PROCESS EXECUTE=file-spec HELP=help-location variable declarations END-PROC help text
A sample process PDF is shown in Figure 2-1.
!**** Note that a line beginning with the exclamation character !**** is considered entirely commentary. ! !**** Note this is a VMS example. ! PROCESS EXECUTE=TESTS: IMGCOPY PARM FROM TYPE=(STRING,30) QUALS=QFROM !proc QFROM contains declaration of qualifiers PARM TO TYPE=(STRING,30) PARM WINDOW TYPE=INTEGER COUNT=4 DEFAULT=(0,1023,0,1023) END-PROC |
The sections of a process PDF are:
The EXECUTE value specifies the name of the executable file. If no name is specified, the executable file with the same name and library as the proc is used. Under VAX/VMS, for example, if the PDF name is MYLIB:TEST.PDF, the default executable is MYLIB:TEST.EXE.
The HELP value specifies the location of the proc's help text. "HELP=*" means that the help text is located in the PDF, following the END-PROC statement. "HELP=help-location" references a separate help file. If the HELP value is omitted, the file name assumed is the file with the same name as the proc. The default type for help files is "HLP".
A TAE procedure provides the capability to package an often-repeated group of TCL commands and to selectively control the execution of the commands. The PDF for a procedure specifies:
The structure is:
PROCEDURE HELP=help-location variable declarations BODY Procedure body with executable TCL commands. END-PROC
A sample procedure is shown in Figure 2-2.
PROCEDURE !IMGCOPY driver for standard images PARM FROM TYPE=(STRING,30) !Source PARM TO TYPE=(STRING,30) !Destination LOCAL WINDOW TYPE=INTEGER COUNT=4 BODY IF (FROM="alaska") LET WINDOW=(0,2048,0,2048) ELSE-IF (FROM="hawaii") LET WINDOW=(0,256,0,256) ELSE LET WINDOW=(0,512,0,512) END-IF IMGCOPY @FROM @TO @WINDOW END-PROC |
The sections of a procedure PDF are:
Note that TCL procedures are interpreted, thus, each command is executed when it is read by TAE. When a proc invocation line is read, the proc is first searched within the procedure for an internal proc and if not found, then the normal hierarchy search is performed. (See Section 2.12.)
See Section 3.4 for details on TCL commands that are used primarily in procedures; see the "TAE Command Language (TCL) User's Manual" for a description of user-oriented commands and for the TCL rules for proc invocation.