IT lexicon › Programming › Common Block

Common Block

Programming På svenska → Updated: 2026-11-13

A Fortran construct for sharing global variables between subprograms without passing them as parameters.

COMMON was Fortran's way of letting subprograms share data. You declared a named block of variables once, and all subprograms could refer to it. It was convenient but error-prone: if two subprograms declared their COMMON blocks in different orders, values could end up in the wrong variable. Modern languages solve this with global variables or class members.

← Back to the lexicon