129. A derived type can have PRIVATE components.#

topic: Derived types

Note

This tip is a draft1.

Derived type components can be declared PRIVATE, in which case they are only visible in the module where the type is defined. Below, b is private and c is public.

type dt private real :: b real, public :: c ! override private 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.