QUIT statement Raises the QUIT condition. By default, this exits from the ABL session and returns to the operating system. When QUIT is executed from within a procedure running on an AppServer, it terminates the ABL session running on the AppServer, causing the AppServer server to shut down and returns to the ABL client session from which it was spawned. Note: Does not apply to SpeedScript programming. Syntax QUIT Example This procedure displays a menu. If you choose the last menu item, Exit ABL, the procedure processes the QUIT statement. r-quit1.p DEFINE SUB-MENU cusmaint1 MENU-ITEM crecust LABEL "Create New Customer" MENU-ITEM chgcust LABEL "Chan&ge Existing Customer" MENU-ITEM delcust LABEL "Delete Customer" MENU-ITEM prtcust LABEL "Print Customer List" MENU-ITEM extcust LABEL "E&xit ABL". DEFINE MENU mainbar MENUBAR SUB-MENU cusmaint1 LABEL "Customer". ON CHOOSE OF MENU-ITEM crecust RUN newcust.p. ON CHOOSE OF MENU-ITEM chgcust RUN chgcust.p. ON CHOOSE OF MENU-ITEM delcust RUN delcust.p. ON CHOOSE OF MENU-ITEM prtcust RUN prncust.p. ON CHOOSE OF MENU-ITEM extcust QUIT. ASSIGN CURRENT-WINDOW:MENUBAR = MENU mainbar:HANDLE CURRENT-WINDOW:VISIBLE = TRUE. WAIT-FOR WINDOW-CLOSE OF CURRENT-WINDOW. Notes To modify the QUIT statement, add the ON QUIT phrase to a block. If QUIT is executed during a transaction, the AVM commits the transaction before exiting. See also ON QUIT phrase, STOP statement
QUIT
DEFINE SUB-MENU cusmaint1
MENU-ITEM crecust LABEL "Create New Customer"
MENU-ITEM chgcust LABEL "Chan&ge Existing Customer"
MENU-ITEM delcust LABEL "Delete Customer"
MENU-ITEM prtcust LABEL "Print Customer List"
MENU-ITEM extcust LABEL "E&xit ABL".
DEFINE MENU mainbar MENUBAR
SUB-MENU cusmaint1 LABEL "Customer".
ON CHOOSE OF MENU-ITEM crecust
RUN newcust.p.
ON CHOOSE OF MENU-ITEM chgcust
RUN chgcust.p.
ON CHOOSE OF MENU-ITEM delcust
RUN delcust.p.
ON CHOOSE OF MENU-ITEM prtcust
RUN prncust.p.
ON CHOOSE OF MENU-ITEM extcust
QUIT.
ASSIGN
CURRENT-WINDOW:MENUBAR = MENU mainbar:HANDLE
CURRENT-WINDOW:VISIBLE = TRUE.
WAIT-FOR WINDOW-CLOSE OF CURRENT-WINDOW.