codee-com/open-catalog

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

Open

#92 建立於 2025年7月1日

在 GitHub 查看
 (1 留言) (0 反應) (0 負責人)Fortran (12 fork)auto 404
Fortrangood first issuenew check

倉庫指標

Star
 (105 star)
PR 合併指標
 (PR 指標待抓取)

描述

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

貢獻者指南