188. PDT can have array dimension, KIND, and character LEN parameters.#

topic: Parameterized derived types

Note

This tip is a draft1.

A parameterized derived type (PDT) can have array dimensions, kinds, and character LENs as parameters, with default values allowed:

type :: matrix(n1,n2,wp) integer, len :: n1, n2 integer, kind :: wp = kind(1d0) real(kind=wp) :: x(n1,n2) end type



1

From the perspective of FortranTip Browser, “draft” means that it hasn’t been edited for formatting, hasn’t had corresponding Fortran programs added, the text content hasn’t been enhanced, etc. Draft texts are extracted from the corresponding Tweet using the Twitter API.