Was this helpful?
Breakdisplay
Terminates a display loop without performing field validation or executing the finalize statement.
Examples--breakdisplay statement:
Example 1:
In the following example, the Quit operation terminates display of the form without validation checking:
## display empform
## initialize
## activate menuitem "Browse"
## {
     browse and update the data on the form
## }
## activate menuitem "Quit"
## {
##   breakdisplay
## }
## finalize
Example 2:
In the following example, a table field is unloaded within the Scan menu section. If an error is detected, breakdisplay terminates both the unloadtable code block and the display block.
## display empform
## activate menuitem "Scan"
## {
##   unloadtable empform employee (vchild = child,
                                vage = age)
##   {
          if (error) then
##             message "Aborting scan on error"
##             sleep 2
##             breakdisplay
          end if
##   }
## }
## finalize
## /* breakdisplay transfers control here. */
Example 3:
The following example illustrates the use of the breakdisplay statement in a display submenu display block:
## display "Form"
## 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 */
##        breakdisplay
##   }
##   finalize
## }
## activate menuitem "Done"
## {
##   /* exit from form display block */
##   breakdisplay
## }
## finalize
Last modified date: 04/03/2024