codee-com/open-catalog

[Fortran] NAG compiler requires to define variable before its usage

Open

#92 geöffnet am 1. Juli 2025

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)Fortran (12 Forks)auto 404
Fortrangood first issuenew check

Repository-Metriken

Stars
 (105 Stars)
PR-Merge-Metriken
 (PR-Metriken ausstehend)

Beschreibung

NAG compiler requires to define variable before its usage in type declaration section. For example, the following code is not correct:

subroutine test(a, n)
  implicit none
  real(8) :: a(n)
  integer :: n
end subroutine test

since usage of n happens before actual type definition.

The proper code is:

subroutine test(a, n)
  implicit none
  integer :: n
  real(8) :: a(n)
end subroutine test

Contributor Guide