126. A derived type can be used where a scalar is needed.#
topic: Derived types
Note
This tip is a draft1.
A derived type variable is a scalar even if it has array components. Arrays of varying-length strings or pointers can be simulated. A derived type can be used where a scalar is required, for example as the dummy argument of an elemental procedure.
A derived type variable is a scalar even if it has array components. Arrays of varying-length strings or pointers can be simulated. A derived type can be used where a scalar is required, for example as the dummy argument of an elemental procedure.pic.twitter.com/QMUCesqyVR
— FortranTip (@fortrantip) February 17, 2022
- 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.