Re: declaring variables in the code



Brooks Moses wrote:
Lynn wrote:

Does any of the new fortrans (post F77) allow you to declare
variables in the code body like C++ does ? We just implemented
the 'implicit none' rule in our 550,000 LOC program and the #1
complaint from the programmers is that they are continually moving
between the top and bottom of the subroutines. And for 2000+
line subroutines, this can be a big jump. We are still using Watcom
F77 but are transitioning to IVF if we get ever get our port finished.


Declarations still have to go before executable code in all current Fortran standards, just as in F77.

Some code-editors do have features that make the jumping around easier, but I don't know any details to suggest offhand. In new code, one gets around this by writing relatively short procedures, but that doesn't help much in legacy code (or in the cases where a short procedure is inappropriate).

I usually just open the code in another window (or several) and have each positioned whereever is convenient.


- Brooks




--

Gary Scott
mailto:garylscott@sbcglobal dot net

Fortran Library: http://www.fortranlib.com

Support the Original G95 Project: http://www.g95.org
-OR-
Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html

If you want to do the impossible, don't hire an expert because he knows it can't be done.

-- Henry Ford
.