Russell, Richard wrote:
>(I sent this to the Lahey forum early today, but so far it hasn't been posted. Re-posted for this audience:)
>
>I noticed something in the LF95 language manual (rev. F, p.90), under COMMON. "Execution of a RETURN or END statement can cause data objects in a named common to become undefined unless the common block name has been declared in a SAVE statement." This strikes me as peculiar, since the whole purpose of a named COMMON block is to make the data in it globally available to any subprogram
>
Well, working from dusty memory (and not being hip to the current Lahey
products) I'd venture to guess that *IF* you have the named common block
in the MAIN program you have the semantics you expect (and the SAVE is
not necessary).
The interesting case (and nothing new to F9x+) is if you have the named
COMMON blocks in subprograms only. Then, a sufficiently clever linker
could violate your notion of COMMON implies SAVE if there are no
subprograms with the COMMON in scope.
I faintly recall being bit by this in ancient days on some mainframe and
a complicated overlay structure.
--
Keith H. Bierman [log in to unmask]
Sun Microsystems PAE | [log in to unmask]
15 Network Circle UMPK 12-325 | 650-352-4432 voice+fax
Menlo Park, California 94025 | sun internal 68207
<speaking for myself, not Sun*> Copyright 2004
------------------------------------------------------------
NOTICE: This email message is for the sole use of the
intended recipient(s) and may contain confidential and
privileged information. Any unauthorized review, use,
disclosure or distribution is prohibited.
If you are not the intended recipient, please contact
the sender by reply email and destroy all copies of the
original message.
|