Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

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

Status
Not open for further replies.

UCDavisPrgmer

Technical User
Feb 20, 2005
2
US
In Java I remember you could comment out entire blocks of code (with // ... // or something), 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 Compaq Visual Fortran (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
 
I think CVF allows C style compile time variables

Use

#ifdef TEST
...
#endif

to exclude code.

It can be included again by adding

#define TEST

at the front of the file (or by commenting out the # statements)

CaKiwi
 
If you have emacs and a Fortran filter for emacs, mark the area and use Ctrl-c.
 
I finally got a chance to try compile time varibles in CVF and they don't work. I'm sure there is something similar, if I find it I will let you know

CaKiwi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top