Re: MODULEand USE versus Argument Passing
- From: Richard E Maine <nospam@xxxxxxxxxxxxx>
- Date: Wed, 29 Jun 2005 10:51:12 -0700
In article
<6Jzwe.1048902$w62.415858@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
*** Hendrickson <***.hendrickson@xxxxxxx> wrote:
> I once spent a fascinating week debugging someone else's
> code (I'd never make this kind of mistake ;) ) where
> there was a
> COMMON blah blah I,J, blah blah
> in the main program and a
> COMMON blah blah J,I, blah blah
> in the subroutine.
My "favorite" example of COMMON mismatches in "real life" came from
something like
COMMON /named/ blah, blah2, ..... , x,
$ y, z, blah3, ..., blah4, blah5
where the comma after the x was in column 73. Of course, this was in
fixed source form and with implicit typing in effect. Thus... there is
an implicitly typed variable named xy in the common instead of the
intended x and y. Naturally, the symptoms weren't obviously related to x
and y, which weren't even referenced in the scoping unit. Instead, blah4
and blah5 had problems because they weren't in the same position in the
common in this scoping unit as they were in other scoping units.
As rare as it might seem, I've actually seen this problem multiple times
(at least once on this newsgroup). Probably people tend to get just a
little "too close" to column 73 and fail to notice when they go over. In
this case, the code "going over" compiles just fine... but not with the
intended effects.
--
Richard Maine | Good judgment comes from experience;
email: my first.last at org.domain | experience comes from bad judgment.
org: nasa, domain: gov | -- Mark Twain
.
- Follow-Ups:
- Re: MODULEand USE versus Argument Passing
- From: glen herrmannsfeldt
- Re: MODULEand USE versus Argument Passing
- From: Rich Townsend
- Re: MODULEand USE versus Argument Passing
- References:
- MODULEand USE versus Argument Passing
- From: Herman D . Knoble
- Re: MODULEand USE versus Argument Passing
- From: *** Hendrickson
- MODULEand USE versus Argument Passing
- Prev by Date: Re: MODULEand USE versus Argument Passing
- Next by Date: Re: MODULEand USE versus Argument Passing
- Previous by thread: Re: MODULEand USE versus Argument Passing
- Next by thread: Re: MODULEand USE versus Argument Passing
- Index(es):