J3/14-204 To: J3 From: Robert Corbett Subject: Enhance CMPLX Date: 2014 June 25 Status: For consideration Basic Functionality: Enhance CMPLX Rationale: Users have complained that KIND= is required for the actual argument corresponding to the dummy argument KIND in a reference of the intrinsic function CMPLX when the actual argument corresponding to the dummy argument X is of type complex. The requirement is not necessary for resolving the reference. Specification: Split the template for the intrinsic function CMPLX into two templates: one where the argument X is of type complex, and a second where the argument X is of type real or integer or is a . The template where the argument X is of type complex omits the dummy argument Y. As a consequence, the requirement that no actual argument shall correspond to Y if the argument X is of type complex is not needed. Syntax: Replace the subclause header <> with <> Edits: [Introduction, p2, editor's choice] Add "In a reference of the intrinsic function CMPLX with an actual argument of type complex, KIND= is not needed to specify a KIND argument." [339:8] (13.7.36) Replace "<>" with "<>" [339:11-15] Replace "<> ... integer constant expression." with "<> X shall be of type complex. KIND (optional) shall be a scalar integer constant expression. <> X shall be of type integer or real, or a . Y (optional) shall be of type integer or real, or a . KIND (optional) shall be a scalar integer constant expression." [339:18-21] Replace "If X is complex, ... as that of CMPLX(X, Y, KIND)" with "If KIND is absent, it is as if KIND were present with the value KIND(0.0). If X is complex, the result is the same as that of CMPLX(REAL(X), AIMAG(X), KIND). The result of CMPLX(X, Y, KIND) is the complex value whose real part is REAL(X, KIND) and whose imaginary part is REAL(Y, KIND)."