(j3.2006) Interface and PURE
Bill Long
longb
Mon Oct 30 17:44:07 EDT 2017
In 15.4.3.2 Interface block (page 305), para 7, we say:
"If an explicit specific interface for an external procedure is specified by an interface body or a procedure declaration statement (15.4.3.6), the characteristics shall be consistent with those specified in the procedure definition, except that the interface may specify a procedure that is not pure even if the procedure is defined to be pure.?
With prefix choices of IMPURE, PURE, and neither, there are 9 possibilities:
OK combinations:
???????????
Procedure definition: PURE, Interface: PURE
Procedure definition: PURE, Interface: IMPURE
Procedure definition: PURE, Interface: (none specified)
Procedure definition: IMPURE, Interface: IMPURE
Procedure definition: (none specified), Interface (none specified)
BAD combinations:
????????????
Procedure definition: IMPURE, Interface: PURE
Procedure definition: (none specified), Interface: PURE
Questionable combinations:
??????????????????
Procedure definition: IMPURE, Interface : (none specified)
Procedure definition: (none specified), Interface IMPURE
The OK group are clearly allowed. The BAD group are clearly disallowed (and dangerous). For ?Questionable? group, are IMPURE and ?none specified? considered ?consistent? for the purposes of this paragraph? (Except for the case of an ELEMENTAL procedure where ?none specified? is equivalent to PURE.) Or are those two options also considered errors?
Cheers,
Bill
Bill Long longb at cray.com
Principal Engineer, Fortran Technical Support & voice: 651-605-9024
Bioinformatics Software Development fax: 651-605-9143
Cray Inc./ 2131 Lindau Lane/ Suite 1000/ Bloomington, MN 55425
More information about the J3
mailing list