Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
29280 Discussions

comment on many consecutive lines

Mike896
Beginner
2,040 Views

Hi,

I'd like to ask how to set comments on many consecutive lines in IVF?

thanks.

Mike

0 Kudos
1 Solution
Jugoslav_Dujic
Valued Contributor II
2,040 Views
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).

View solution in original post

0 Kudos
2 Replies
DavidWhite
Valued Contributor II
2,040 Views
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

0 Kudos
Jugoslav_Dujic
Valued Contributor II
2,041 Views
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).

0 Kudos
Reply