COSHAPE (The GNU Fortran Compiler)

### 8.81 `COSHAPE` — Determine the coshape of a coarray ¶

Synopsis:

  `RESULT = COSHAPE(COARRAY [, KIND])`

Description:

  Returns the shape of the cobounds of a coarray.

Class:

  Inquiry function

Arguments:

  COARRAY | Shall be an coarray, of any type.
  KIND | (Optional) A scalar `INTEGER` constant expression indicating the kind parameter of the result.

Example:

      program test_cosh
        real(8) :: x[*]
        integer, allocatable :: csh (:)
        csh = coshape(x, kind = kind(csh))
      end program test_cosh

Standard:

  Fortran 2018

See also:

  `SHAPE` — Determine the shape of an array