Compaq AA-PWCBD-TE Computer Accessories User Manual


 
DEC Text Processing Utility Program Development
5.1 Creating DECTPU Programs
Example 5–3 Sample DECTPU Programs
! Program 1
! This program consists of a single DECTPU built-in procedure.
SHOW (KEYWORDS);
! Program 2
! This program consists of an assignment statement that
! gives a value to the variable video_attribute
video_attribute := UNDERLINE;
! Program 3
! This program consists of the DECTPU LOOP statement (with
! a condition for exiting) and the DECTPU built-in procedure ERASE_LINE.
x := 0; LOOP x :=x+1; EXITIF x > 100; ERASE_LINE; ENDLOOP;
! Program 4
! This program consists of a single procedure that makes
! DECTPU quit the editing session.
PROCEDURE user_quit
QUIT; ! do DECTPU quit operation
ENDPROCEDURE;
! Program 5
! This program is a collection of procedures that
! makes DECTPU accept "e", "ex", or "exi" as
! the command for a DECTPU exit operation.
PROCEDURE e
EXIT; ! do DECTPU exit operation
ENDPROCEDURE;
PROCEDURE ex
EXIT;
ENDPROCEDURE;
PROCEDURE exi
EXIT;
ENDPROCEDURE;
5.2 Programming in DECwindows DECTPU
This section provides information about programming with DECTPU in the
DECwindows environment.
5.2.1 Widget Support
With DECwindows DECTPU, you can create widgets from within DECTPU
programs by using the CREATE_WIDGET built-in procedure. For more
information on widgets, see the OpenVMS overview documentation.
With the CREATE_WIDGET built-in, you can create the following widgets in
DECTPU:
Caution_box
Dialog_box
File_selection
Label
List_box
Main_window
5–4 DEC Text Processing Utility Program Development