Testing the Happened State

The happened test inspects the happened state of an event. This test returns a value of TRUE if the event is HAPPENED and FALSE if the event is NOT HAPPENED.

Note that repeated happened tests are not the most efficient method of waiting on an event. Refer to Efficiency Considerations later in this section.

The following ALGOL statement invokes the procedure PFILE if the event E1 is HAPPENED:

IF HAPPENED (E1) THEN PFILE;

The following COBOL statement has the same effect:

IF E1 THEN GO PFILE.