The software engineering tool which changes to the code recognises all variant declarations, with arbitrary differences in white space and upper and lower case. For example, in the beginning of the module shown below:
MODULE module_limiters INTEGER,PARAMETER :: kd = KIND(1.0D0) CONTAINS REAL(KIND=kd) FUNCTION limiter(a,b,c) REAL(kd),INTENT(IN) :: a,b,c REAL*8 :: t t = MAX(a,b) limiter = MIN(t,c) END FUNCTION limiter
the 8-byte real variables are declared as REAL(KIND=kd), REAL(kd), and the legacy (but still common) format REAL*8. The declarations also contain the additional keywords FUNCTION and INTENT. All are converted to TYPE (em_real_k8):
MODULE module_limiters ! USE module_emulate_real_arithmetic ! INTEGER,PARAMETER :: kd = KIND(1.0D0) ! CONTAINS ! TYPE (em_real_k8) FUNCTION limiter(a,b,c) TYPE (em_real_k8),INTENT(IN) :: a,b,c TYPE (em_real_k8) :: t t = MAX(a,b) limiter = MIN(t,c) END FUNCTION limiter