Implied do loop of FORTRAN

与传统的DO语句相比,Implied DO语句结构简单(仅一行代码)。

示例:

program main
    implicit none
    integer :: i
    integer(dimension = 3) :: iarray
    iarray = 4
    print *, (iarry(i), i = 1, 3)
end program main

将打印出:

4    4    4


你可能感兴趣的:(语言经验,FORTRAN)