- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I'd like to ask how to set comments on many consecutive lines in IVF?
thanks.
Mike
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A "quick'n'dirty" method to comment out a huge block of code is to use preprocessor:
!DEC$IF (.FALSE.)
...
!DEC$ENDIF
or, if you're using /fpp switch:
#if 0
...
#endif
However, that is suitable only e.g. if you're doing code bisection (bug tracing by removing huge chunks of code at the moment). I would never leave such "comment" permanently in the code (code coloring does not work in such cases, for the start).
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Quoting - Mike896
Hi,
I'd like to ask how to set comments on many consecutive lines in IVF?
thanks.
Mike
Mike,
All comments in Fortran are line comments only. There is no equivalent of /* ... */ as in C, etc. You need to place ! or C at the beginning of each line to make it a comment.
In visual studio, you can select multiple lines and then use Ctrl-K, ctrl-C to make all lines comments.
Regards,
David
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A "quick'n'dirty" method to comment out a huge block of code is to use preprocessor:
!DEC$IF (.FALSE.)
...
!DEC$ENDIF
or, if you're using /fpp switch:
#if 0
...
#endif
However, that is suitable only e.g. if you're doing code bisection (bug tracing by removing huge chunks of code at the moment). I would never leave such "comment" permanently in the code (code coloring does not work in such cases, for the start).

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