END statement

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

See also

CASE statement, CATCH statement, CLASS statement, CONSTRUCTOR statement, DEFINE PROPERTY statement, DESTRUCTOR statement, DO statement, EDITING phrase, ENUM statement,FINALLY statement, FOR statement, FUNCTION statement, INTERFACE statement, METHOD statement, PROCEDURE statement, REPEAT statement, Trigger phrase