J3/07-101 Date: 22 Nov 2006 To: J3 From: Richard Maine Subject: Elemental and BIND(C) NUMBER: TITLE: Elemental and BIND(C) KEYWORDS: Elemental, BIND(C), ENTRY DEFECT TYPE: STATUS: Submitted QUESTION: Is it allowed for a procedure to have both the BIND(C) and elemental attributes? Constraint C1242 disallows trivial ways of writing an elemental BIND(C) procedure. However, the following example achieves the effect for sub_c without violating the syntactic constraint. elemental subroutine sub(x) entry sub_c(x) bind(c) end subroutine sub ANSWER: No, it is not allowed. Constraint C1242 was intended to disallow the combination of elemental and BIND(C), but it inadvertantly failed to cover the case shown in the above example. EDITS Replace C1242 in subclause 12.5.2.1 with "C1242 A procedure shall not have both the ELEMENTAL and BIND attributes". {An alternate edit would be to leave C1242 alone and add a constraint on the ENTRY statement. I think this edit is better, as it is phrased in terms of semantics instead of syntax. This one thus applies to any syntax for doing the same thing.} {Also note that the omission of the (R1227) from this edit is intentional and important. The revised constraint applies generally rather than just to R1227.} SUBMITTED BY: Richard Maine HISTORY: J3/07-101 m179 Submitted