To: J3 J3/14-181 From: David Muxworthy Subject: UK proposal UK-19 COSHAPE intrinsic Date: 2014 June 09 Status: For Consideration Basic Functionality: Add COSHAPE intrinsic Rationale: It is irregular to have LCOBOUND and UCOBOUND intrinsics, but not to have COSHAPE. Specification: Add COSHAPE intrinsic to return the coshape of a coarray. Syntax: Add new intrinsic function COSHAPE. Edits to J3/14-007r1(= N2014): [322] In 13.5 Standard generic intrinsic procedures, Table 13.1, after the entry for COSH add: "COSHAPE (COARRAY [, KIND]) I Coshape of a coarray." [340:18+] In 13.7 Specifications of the standard intrinsic procedures, after the specification of COSH, add 13.7.5a COSHAPE (COARRAY [, KIND]) <> Coshape of a coarray. <> Inquiry function. <> COARRAY shall be a coarray of any type. It shall not be an unallocated allocatable coarray. KIND (optional) shall be a scalar integer constant expression. <> Integer. If KIND is present, the kind type parameter is that specified by the value of KIND; otherwise, the kind type parameter is that of default integer type. The result is an array of rank one whose size is equal to the corank of COARRAY. <> The value of the result is the coshape of COARRAY. <> The following code allocates the coarray D with the coshape of the coarray C. ALLOCATABLE :: C[:,:], D[:,:], COSHAPE_C(:) : COSHAPE_C = COSHAPE(C) ALLOCATE ( D[COSHAPE_C(1),COSHAPE_C(2)] )