home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!gatech!hubcap!jtbell
- From: jtbell@hubcap.clemson.edu (Jon Bell)
- Subject: Re: Jumping from nested subroutine to main directly?
- Message-ID: <1992Nov22.030251.243@hubcap.clemson.edu>
- Organization: Presbyterian College, Clinton SC
- References: <DODD.92Nov21071326@mycenae.cchem.berkeley.edu> <By2xxC.JAB@mentor.cc.purdue.edu> <1992Nov21.222705.20726@monu6.cc.monash.edu.au>
- Date: Sun, 22 Nov 1992 03:02:51 GMT
- Lines: 21
-
- In article <1992Nov21.222705.20726@monu6.cc.monash.edu.au> map@hal.maths.monash.edu.au (Michael Page) writes:
- >
- >(Which also prompts me to ask why the ENTRY statement is so frowned upon
- >that it is now deprecated? Is it superceded by something else?)
- >
- In situations where where several subroutines need to share the same data,
- I think it's considered better form to do one of the following:
-
- (a) Pass the data to each subroutine explicitly, as arguments; or, if this is
- too clumsy or inefficient,
-
- (b) Let the subroutines share the data via a well-documented COMMON block.
-
- I understand that FORTRAN 90 allows you to group subroutines together into
- "modules" which share the same data.
-
- In situations where two subroutines share much of the same code, it's considered
- better form to split off the common code into a separate subroutine, or maybe
- put it in an INCLUDE file if your compiler allows it.
-
- Jon Bell / Dept. of Physics & Comp. Sci. / Presbyterian College / Clinton SC USA
-