Re: Please help me understand my code



dpb wrote:

Richard Maine wrote:

www <www@xxxxxxxxxx> wrote:

I am also surprised to find out that Fortran variables are case insensitive! This makes me realize that tsoil(8) is TSOIL(8). TSOIL is
an array declared and used at the top.


Ah. I hadn't thought of that possible confusion. I was thinking about
much more subtle things.

Do note that although the language allows you to be inconsistent in
case, many people advise adopting a style of being consistent in at
least using the same case for all appearances of the same variable.

I understand that this isn't your code. Just advice for the future.


And for the OP a little background (but not trying to be more than superficial here) -- FORTRAN originally included only uppercase and the numbers plus special characters (+, -, etc.) so all code HAD to be written in uppercase only. Accepting lowercase became a common extension to the Standard and was added in later versions but to retain compatibility w/ existing code case-insensitivity was required to not break existing code.

....besides being in general a Good Thing.


--




--

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
.



Relevant Pages

  • Re: The linf project
    ... language and to be honest with you, ... Support the Original G95 Project: http://www.g95.org ... Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html ...
    (comp.lang.fortran)
  • Re: The linf project (2)
    ... names for a single data type. ... Support the Original G95 Project: http://www.g95.org ... Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html ...
    (comp.lang.fortran)
  • Re: F95 standard
    ... xdvik, ghostscript, and a modern computer allows me to edit documents and ... If you need to run Windows rather than some flavour of UNIX. ... Support the Original G95 Project: http://www.g95.org ... Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html ...
    (comp.lang.fortran)
  • Re: better way to name optional argument
    ... Mike wrote: ... For an existent subroutine, I'd like to add an optional argument to do ... Support the Original G95 Project: http://www.g95.org ... Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html ...
    (comp.lang.fortran)
  • Re: Killing the task
    ... My code writes to the disk the list of PIDs, ... Unfortunately i was not able to realise Garry Scott's suggestion. ... Support the Original G95 Project: http://www.g95.org ... Support the GNU GFortran Project: http://gcc.gnu.org/fortran/index.html ...
    (comp.lang.fortran)