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

Cycling block-do-construct with inner block-construct

$
0
0

Hi, I'm wondering if there exists a way (other than branching) for exiting or cycling within a inner block in a do block:

...
do i=1,10
    block
        integer :: k
        ...
        if (...) then
            ...
            cycle !not possible
        end if
        ...
    end block
end do

More general, the question is, if its possible to terminate the execution of a block-construct without using IF/GOTO? I've looked into the standard but I've found no other possibilities...

IMO such a feature would be especially usefull in combination with DO CONCURRENT and the need of iteration local variables.

Thanks


Viewing all articles
Browse latest Browse all 2583

Trending Articles



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