To: J3 J3/25-160 From: Malcolm Cohen Subject: Interp on CHANGE TEAM construct Date: 2025-June-26 ---------------------------------------------------------------------- NUMBER: F23/019 TITLE: Is CHANGE TEAM or END TEAM a possible branch target KEYWORDS: CHANGE TEAM construct, branching DEFECT TYPE: Erratum STATUS: J3 consideration in progress REFERENCES: 24-007 QUESTION: Consider the following program fragment: IF (NUM_IMAGES()>1) GO TO 100 STOP 'Not enough images' 100 CHANGE TEAM (myteam) IF (THIS_IMAGE()==1) GO TO 200 PRINT *,'HELLO',THIS_IMAGE() 200 END TEAM Are the GO TO 100 and GO TO 200 statements valid? 11.1.5.2 Execution of a CHANGE TEAM construct, p3 states "It is permissible to branch to an end-change-team-stmt only from within its CHANGE TEAM construct." which says that GO TO 200 is permitted, but 11.2.1 Branch concepts, p1 states "A branch target statement is an action-stmt, ..." and end-change-team-stmt (the BNF term for the END TEAM statement) do not appear in the list. Then, the GO TO statement has the constraint "C1174 (R1159) The label shall be the statement label of a branch target statement..." Similarly, the change-team-stmt does not appear in the list of branch target statements, which would mean that the GO TO 100 statement is invalid. (I could not find any text that contradicted that.) ANSWER: The CHANGE TEAM and END TEAM statements were intended to be possible branch targets; their omission from the definition of branch target statement was inadvertent. EDITS to 24-007: [6:35-39] 3.18 branch target statement, Note 1 to entry, Replace the entire Note with the more future-proof "Branching is described in 11.2. The statements that are permissible branch targets are listed in 11.2.1." {Given the hyperlink, we never needed to duplicate this list.} [213:25] 11.2.1 Branch concepts, p1, final sentence, after "end-associate-stmt," insert "change-team-stmt, end-team-stmt,". {In a future revision this list should be an alphabetic table, but changing the format is inappropriate in a corrigendum. I picked "after end-associate-stmt" because the next thing is the IF construct, and CHANGE TEAM is described in between those two. The rest of the list is all over the place though. I didn't want to add to the end of the list as that means moving the "or".} SUBMITTED BY: Malcolm Cohen HISTORY: 23-nnn m236 Submitted ----------------------------------------------------------------------