090. An unqualified USE foo statement imports public entities defined in foo and what foo imported.#
topic: Modules
Note
This tip is a draft1.
use foo
imports not only the public entities defined in module foo but also the entities that foo imports from module bar. To avoid inadvertent imports and clarify what is imported, write
use foo, only: <imports> use bar, only: <imports> ! if any
use foo
— FortranTip (@fortrantip) January 15, 2022
imports not only the public entities defined in module foo but also the entities that foo imports from module bar. To avoid inadvertent imports and clarify what is imported, write
use foo, only: <imports>
use bar, only: <imports> ! if anypic.twitter.com/9s78tF1V5Q
- 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.