J3/98-149 Date: 1998/05/08 To: J3 From: Henry Zongaro Subject: Interpretation request on WHERE statement in WHERE construct NUMBER: TITLE: Execution of a WHERE statement within a WHERE construct KEYWORDS: WHERE statement, WHERE construct DEFECT TYPE: STATUS: J3 consideration in progress QUESTION: 7.5.3.2 [113:17-19] indicates that: Upon execution of a WHERE statement or a WHERE construct statement that is part of a , the pending control mask is established to have the value m  .AND. (.NOT. mask-expr). c [112:41-45] indicates that: Upon execution of an ENDWHERE statement, the control mask and pending control mask are established to have the values they had prior to the execution of the corresponding WHERE construct statement. Following the execution of a WHERE statement that appears as a , the control mask is established to have the value it had prior to the execution of the WHERE statement. Notice that after execution of an ENDWHERE statement, the pending control mask is established to have the value it had prior to the execution of the corresponding WHERE construct statement, but the same is not the case for the pending control mask established by the execution of a WHERE statement that appears as a . According to this, the output of the following program PROGRAM P INTEGER :: A(2) = 0, B(2) = 0 WHERE((/.TRUE.,.TRUE./)) WHERE((/.TRUE.,.FALSE./)) A = 1 ELSEWHERE A = 2 END WHERE PRINT *, A WHERE((/.TRUE.,.TRUE./)) WHERE((/.TRUE.,.FALSE./)) B = 1 END WHERE ELSEWHERE B = 2 END WHERE PRINT *, B END PROGRAM P will be 1 2 1 0 Was this difference in behaviour intended by the committee? ANSWER: EDIT: SUBMITTED BY: Henry Zongaro HISTORY: 98-149 m145 Submitted