Compaq AAQ2G1FTK Marine Radio User Manual


 
Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms
11.3 Designing Video Forms with Screen Section ACCEPT and DISPLAY
Example 11–12 (Cont.) Designing a Video Form for a Daily Calendar
* For brevity, the sample program includes complete code
* for the "Schedule Appointment" screen only. A complete
* program for a calendar would also include code for
* displaying, canceling, and printing the days appointments.
IF CURSOR-LINE = 7
DISPLAY "You selected Show Appointments" LINE 22.
IF CURSOR-LINE = 9
MOVE "01" TO APPT-DAY
MOVE "01" TO APPT-MONTH
MOVE "94" TO APPT-YEAR
MOVE "12" TO APPT-HOUR
MOVE "00" TO APPT-MINUTE
MOVE "AM" TO APPT-MERIDIEM
DISPLAY SCHEDULE-SCREEN
* The user types the description, date, and time of the
* appointment.
ACCEPT SCHEDULE-SCREEN
MOVE "Y" TO APPT-VERIFY
DISPLAY VERIFY-SUBSCREEN
* The user is asked, "Is this entry correct?" Answer is
* Y or N.
ACCEPT VERIFY-SUBSCREEN.
IF CURSOR-LINE = 11
DISPLAY "You selected Cancel Appointments" LINE 22.
IF CURSOR-LINE = 13
DISPLAY "You selected Print Appointments" LINE 22.
END PROGRAM MENU.
In Figures 11–14 and 11–15, the output from the sample program is shown.
Using ACCEPT and DISPLAY Statements for Input/Output and Video Forms 11–39