Indicates the end of a block started with a CASE, CATCH, CLASS, CONSTRUCTOR, DESTRUCTOR, DO, ENUM, FINALLY, FOR, FUNCTION, INTERFACE, METHOD, PROCEDURE, or REPEAT statement or the end of an EDITING phrase, Trigger phrase, or the implementation of a GET or SET property accessor.
Syntax
END [ CASE | CATCH | CLASS | CONSTRUCTOR | DESTRUCTOR | ENUM | FINALLY | FUNCTION | GET | INTERFACE | METHOD | PROCEDURE | SET | TRIGGERS ]
[ CASE | CATCH | CLASS | CONSTRUCTOR | DESTRUCTOR | ENUM | FINALLY | FUNCTION | GET | INTERFACE | METHOD | PROCEDURE | SET | TRIGGERS ]
An option that can appear following any END statement that terminates the block for a statement or phrase that is specified with the same name.
Example
This procedure contains two blocks, each ending with the END statement:
r-end.p
FOR EACH Customer NO-LOCK:
DISPLAY Customer.CustNnum Customer.Name Customer.Phone.
FOR EACH Order OF Customer NO-LOCK:
DISPLAY Order WITH 2 COLUMNS.
END. END.
Notes
Two blocks, the CATCH block and the FINALLY block, are called end blocks because they must appear after the last line of executable code and before the END statement. CATCH blocks must appear before FINALLY blocks. See the entries for these two blocks for information about usage.
If you do not use any END statements in a procedure, ABL assumes that all blocks end at the end of the procedure.
If you use any END statements in a procedure, you must use one END statement for every block in the procedure.