128. A derived type component can have a default value.#
topic: Derived types
Note
This tip is a draft1.
If a derived type component is given a default value, the default constructor can be called without setting that component, which takes that value.
If a derived type component is given a default value, the default constructor can be called without setting that component, which takes that value.pic.twitter.com/xQ8uWiZU52
— FortranTip (@fortrantip) February 19, 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.