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

How to use PARAMETERS in a DATA statement?

WSinc
New Contributor I
462 Views
0 Kudos
1 Reply
mecej4
Honored Contributor III
462 Views
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 Kudos
Reply