Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: dmurphy@gemmax.zko.dec.com (Dennis Murphy)
Subject: Re: Fortran Block Data statements not recognized in libraries
Date: 5 Aug 1994 14:09:31 GMT	[thread overview]
Message-ID: <31th6r$51l@jac.zko.dec.com> (raw)
In-Reply-To: CSH.94Aug4111259@ners6k4.eos.ncsu.edu


    Chuck, if you modify your program as follows:

gemosf.zko.dec.com> more main.f
        common /waa/ foo
        external bd
        real foo
        write (*,*) 'before sub, foo=',foo
        call sub
        write (*,*) 'after  sub, foo=',foo
        end
gemosf.zko.dec.com>
gemosf.zko.dec.com> f77 -c main.f
gemosf.zko.dec.com> f77 -o waa main.o waa.a
gemosf.zko.dec.com> waa
 before sub, foo=   1.000000
 after  sub, foo=   2.000000
gemosf.zko.dec.com>


    everything works correctly.

    The problem you encounter is that the linker doesnt pull the common waa
    out of the block dat bd contribution. I'll let the Fortran Gurus explain
    why. 

						Hope this helps


  parent reply	other threads:[~1994-08-05 14:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-08-04 15:12 Fortran Block Data statements not recognized in libraries Chuck Henkel
1994-08-04 16:55 ` James Tappin
1994-08-05  7:53   ` David L Terrett
1994-08-05 14:09 ` Dennis Murphy [this message]
1994-08-08 18:00   ` Dave Eklund
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox