Modules is one of the source-code metrics Understand computes across 17+ languages — browse them in the GUI, export and track them, or script them with the Python API.
Modules
API ID: CountDeclModuleLanguages: Fortran, Jovial, Pascal
Targets: Architectures, Files, Functions, Modules, Project, Subprograms
Number of modules.
For example:
MODULE sample_mod
IMPLICIT NONE
CONTAINS
SUBROUTINE mod_internal_sub(x)
INTEGER, INTENT(IN) :: x
PRINT *, x
END SUBROUTINE mod_internal_sub
END MODULE sample_mod
sample.f90 declares one MODULE, sample_mod, so CountDeclModule = 1 for this file.
See Program Units for the combined count across modules, block data units, and subprograms.
Targets By Language:- Fortran: Project, File, Module, Block Data, Function, Program, Subroutine
- Jovial: Project, File
- Pascal: Project, File
- For projects and architectures, this metric is enabled from "Project Configuration/Metrics/Projects and Architectures" with the "Show aggregated file metrics" option.