codee-com/open-catalog

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

Open

#92 opened on 2025年7月1日

GitHub で見る
 (1 comment) (0 reactions) (0 assignees)Fortran (12 forks)auto 404
Fortrangood first issuenew check

Repository metrics

Stars
 (105 stars)
PR merge metrics
 (PR metrics pending)

説明

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

コントリビューターガイド