Quantcast
Channel: Intel® Fortran Compiler for Linux* and macOS*
Viewing all articles
Browse latest Browse all 2583

Derived type component as do-variable

$
0
0

Hi,

The following code is rejected by the ifort compiler.

implicit none

type t
    integer :: i = 0
end type

type(t) :: a

do a%i = 1, 10
    print *,'something'
enddo

end

Looking at the standard, I saw no constraint about the do-variable (other than being of integer type), but gfortran also rejects the code. Am I missing something?





 


Viewing all articles
Browse latest Browse all 2583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>