139. BLOCK construct allows declarations after executable statements.#

topic: Basics

Note

This tip is a draft1.

The BLOCK construct of Fortran 2008 allows variables to be declared and exist only within the block. This permits variables to be declared closer to their use and deallocated earlier and can avoid name clashes. If the block is named, EXIT <name> leaves it



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.