Re: use module



Andrew Smith wrote:
rudra wrote:

EPC s last post provoke me to ask a question, may be a bit idiotic.
I am prone to use too many modules in my codes as different programme
and then compile them using makefile. I do this due to readability. do
this affect efficiency of the code(you see, too many code, to many USE
etc)?
plz comment.

I tend to put every subroutine or function in it own module and that reduces the chance of cross dependencies between modules. It also compiles fast and has no effect on run time as far as I know. I have about 400 modules in my application and it is rising fast.
Andy
Heavens. I dislike having large numbers of files. Seems like a CM nightmare to me and logical grouping makes things easier to locate to me than searching through directories of hundreds or thousands of files. I tend to group like functionality into single modules. I treat them somewhat like libraries (and sometimes like include files).

--

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: Reading BMP graphic file
    ... As far as I compile with my CVF, ... 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: Compaq Visual Fortran
    ... 'twas some time ago. ... With fps you could compile and ... 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: Press any key to continue?
    ... You will need to compile with a special option, ... g77 -fno-underscoring whatever.f ... 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: Reading BMP graphic file
    ... As far as I compile with my CVF, ... Gary Scott ... Support the Original G95 Project:  http://www.g95.org ... Support the GNU GFortran Project:  http://gcc.gnu.org/fortran/index.html ...
    (comp.lang.fortran)
  • 2.6.19-rt3: compilation failure
    ... Upon an attempt to compile 2.6.19-rt3 I encountered the following compile ... The kernel .config file follows. ... # Firmware Drivers ... # ACPI Support ...
    (Linux-Kernel)