Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29276 讨论

How to use PARAMETERS in a DATA statement?

WSinc
新分销商 I
466 次查看
0 项奖励
1 回复
mecej4
名誉分销商 III
466 次查看
How about this? [fortran]integer, parameter :: MUL = 7 integer :: i, a(3) = (/(i,i=1,3)/)*MUL write(*,*)a end[/fortran] OR, equivalently, [fortran] integer, parameter :: MUL = 7 integer :: i, a(3) = [1:3]*MUL write(*,*)a end [/fortran]
0 项奖励
回复