- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I was wondering if we can put block comments in Fortran files. For instance we can do it in C using /* ... */ and in MATLAB by using %{ ... %}.
-Kulachi
-Kulachi
Link Copied
5 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
AFAIK this is not possible in IVF.
But you can "block comment" with the Visual Studio IDE. The Hotkey is Ctrl+E, Cand puts comment to all marked lines. Ctrl+E, U removes the comment.
Markus
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks! I never get to understand MSVS IDE. It would have been nice if Intel had a separate IDE for Fortran. Hope the next version of IVF would include this block comment facility.
Kulachi
Kulachi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Kulachi,
As a hack you can enable Preprocessing (FPP). FPP will recognize C style comments.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The Fortran language does not contain a block comment syntax. You can do something like this (specific to the Intel compiler):
!DEC$ IF (.false.)
commented-out-stuff
!DEC$ END IF
Rather ugly, but it works and does not require enabling FPP.
!DEC$ IF (.false.)
commented-out-stuff
!DEC$ END IF
Rather ugly, but it works and does not require enabling FPP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>> !DEC$ IF (.false.)
Good point. Also doesn't clutter disk with .i90 files.
Jim

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