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

贡献者指南