Program part
A program part defines the central logical unit in a run-time Java program. For an overview of main and called programs and of the program types (basic and textUI), see Parts.
Any kind of program part includes a function called main, which represents the logic that runs at program start up. A program can include other functions and can access functions that are outside of the program. The function main can invoke those other functions, and any function can give control to other programs.
The most important program properties are as follows:
- Each parameter references an area of memory that contains data received from a caller. Parameters are global to the program and are valid only in called programs.
- Each variable references an area of memory that is allocated in and global to the program.
- A form group is a collection of forms that present data to the user:
- A basic program can present data to a printer by way of print forms
- A text program can present data interactively (by way of text forms) or to a printer
For details, see FormGroup part.
- An input record is an area of global memory that receives data when control is transferred asynchronously from another program. An input record is available only in a main program.
- In main text programs, the segmented property determines what actions are taken automatically before the program issues a converse statement to present a text form. For details, see Segmentation.
- Also in text programs, an input form has one of two purposes at program start up:
- The form is presented to a user who invokes the program from a monitor or terminal
- Alternatively, data that was entered by a user is received into the input form, which is a memory area in the program itself. This situation applies only in the case of a deferred program switch, which is a two-step transfer of control that is caused by a variant of the show statement--
- A program submits a text form to the user, then terminates
- The user submits the form, and by virtue of information in the form, the submission automatically invokes a second program, which contains the input form
For a complete list of program properties, see Program part properties.
Related concepts
FormGroup part
Function part
Parts
References to variables and constants
Segmentation in text applications
Related tasks
Creating an EGL program part
Related reference
Content assist
Data initialization
EGL source format
EGL statements
Program part in EGL source format
Program part properties