J3/10-178 To: J3 Subject: Interpretation concerning loop termination From: Van Snyder Date: 2010 June 10 ---------------------------------------------------------------------- NUMBER: F08/xxxx TITLE: Does a procedure reference cause loop termination? KEYWORDS: branch, transfer of control, loop termination, procedure reference DEFECT TYPE: Erratum STATUS: Under consideration QUESTION: Consider the following DO construct DO CALL SUB END DO According to subclause 8.1.6.6.4 in N1830, loop termination occurs when "Control is transferred from a statement within the range of a DO construct to a statement that is neither the nor within the range of the same DO construct." A subroutine reference is a transfer of control. The first executable statement of SUB is not within the range of the DO construct. Does the loop terminated when SUB is invoked? ANSWER: It is not intended that execution of a DO construct be terminated by a procedure reference. Edits are provided to correct this. EDITS: Replace the fourth item in the bulleted list in subclause 8.1.6.6.4 Loop termination with the following: "o A branch occurs within the range of a DO construct and the branch target statement is neither the nor within the range of the same DO construct." SUBMITTED BY: Van Snyder HISTORY: ----------------------------------------------------------------------