Enddisplay
Terminates a display loop.
Examples--enddisplay statement:
Example 1:
In this example, the End operation terminates display of the form:
## display empform
## initialize
## activate menuitem "browse"
## {
browse and update the data on the form
## }
## activate menuitem "end"
## {
## enddisplay
## }
## finalize (vname = ename, vage = age)
Example 2:
In this example, a table field is unloaded within the Scan menu activate section. If an error condition is detected, enddisplay terminates both the display and the unloadtable.
## display empform
## activate menuitem "scan"
## {
## unloadtable empform employee
## (vchild = child, vage = age)
## {
if (error) then
## message "ending the scan"
## sleep 2
## enddisplay
end if
## }
## }
## finalize (vname = ename, vdept = dept, vsal = sal)
/* enddisplay transfers control to the finalize statement ** above.
*/
Example 3:
The following example uses the enddisplay statement in a display submenu display block:
## display empform
## activate menuitem "utilities"
## {
## display submenu
## activate menuitem "delete"
## {
do delete based on data on form
## }
## activate menuitem "file"
## {
place data on form into a file
## }
## activate menuitem "end"
## {
/* exit from the submenu display block */
/* after validating data on form */
## enddisplay
## }
## finalize (vbalance = balance)
## }
## activate menuitem "done"
## {
/* exit from form display block */
/* after validating data on form */
## enddisplay
## }
## finalize (vtotal = total )
Last modified date: 08/14/2024