5. Improve data type consistency and management

April 29, 2025 ยท View on GitHub

Overview

Ensure the consistency of data types by avoiding implicit typing and standardizing the code on a fixed set of real kinds, improving readability and portability across different development environments. Use derived data types to represent complex multi-field structures. Leverage pointers and allocatable arrays for safer memory handling.

Checks

  • PWR007: Disable implicit declaration of variables and procedures.

  • PWR071: Prefer real(kind=kind_value) for declaring consistent floating types.

  • Planned: Prefer derived types over constructs such as structure or record to represent complex multi-field entities.

  • Planned: Replace equivalence statements by pointers or the transfer intrinsic as needed.

  • Planned: Consider replacing fixed-size arrays with allocatables.