- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a simple block construct:
BLKF: block
call fcn(x, f, flag)
nf = nf + 1
if (flag < 0) then
exit BLKF
end if
phi = f**2
end block BLKF
Using Intel Parallel Studio XE 2015 for Windows, the following error is generated causing compilation to be aborted:
Error 1 error #6604: The CYCLE or EXIT statement must belong to a particular DO construct, and they do not.
Apparently, exit statements are not allowed in blocks. However, it was my understanding that it is one of the major benefits of using a block.
Any help will be greatly appreciated in this regard.
Best,
Avinash
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This has been implemented for the 16.0 compiler, which you can get a beta version of. In Fortran 2008, EXIT can be used in any block construct. The 16.0 compiler allows it in BLOCK only - in the future that will be expanded.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve Lionel (Intel) wrote:
This has been implemented for the 16.0 compiler, which you can get a beta version of. In Fortran 2008, EXIT can be used in any block construct. The 16.0 compiler allows it in BLOCK only - in the future that will be expanded.
That's great news, Steve. I didn't notice it in the Release Notes nor the browser-based documentation, so I assumed it was not implemented yet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ah, it didn't make the initial beta. It will be in the beta update.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank-you everyone for the helpful answers.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page