Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29253 Discussions

Commenting out blocks of code at a time in Fortran? (CVF 6.1)

ucdavisprgmer
Beginner
391 Views
In Java I remember youcould comment out entire blocks of code (with //... //), in MatLab, you can select a block of code and comment it out all at once (it inserts a '%' in front of each line).
Is it possible in CompaqVisFortran (6.1), or in Fortran in general, to comment out blocks of code? I'm spending alot of time typing then erasing: ! downarrow, ! downarrow, ! downarrow, etc.
Thank you for your ideas and help,
-J

Message Edited by UCDavisPrgmer on 02-23-2005 11:11 AM

0 Kudos
2 Replies
sabalan
New Contributor I
391 Views
If you need this while debugging then you can use "conditional compile" writing
!DEC$ IF (.False.)
before the block, and
!DEC$ END IF
after the block.
Sabalan.
0 Kudos
ingo_berg
Beginner
391 Views
Something like this?

http://www.codeproject.com/macro/solesby.asp

Needs to be adjusted to fortran comment syntax, should not be a problem.
0 Kudos
Reply