Fortran 中的数组声明 [英] Array declaration in Fortran

查看:38
本文介绍了Fortran 中的数组声明的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

考虑

INTEGER,DIMENSION(3) :: NumberVector

INTEGER              :: NumberVector(3)

这两个声明之间有什么区别还是完全一样?(我的意思是在任何可能的上下文和变化中:例如,在这两个相同的情况下,如果我将具有隐式大小的数组声明为子例程的输入参数之一怎么办?它仍然与哪个无关我用过?)

Is there any difference whatsoever between these two declarations or are they exactly the same? (I mean in ANY possible context and variation: for example, in the case that those two were identical, what if I am declaring an array with an implicit size as one of the input parameter of a subroutine? Would it still be irrelevant which one I used?)

推荐答案

是的,完全一样.即使是假设的、延迟的和任何可能的形状.

Yes, it is identical. Even for assumed, deferred and whatever possible shape.

这篇关于Fortran 中的数组声明的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆