Article View: net.lang.f77
Article #381Re: Subroutine bug with 4.2 BSD F77.
From: Jim Thompson
Date: Wed, 18 Jun 1986 11:18
Date: Wed, 18 Jun 1986 11:18
48 lines
1408 bytes
1408 bytes
In article <3174@sjuvax.UUCP> bbanerje@sjuvax.UUCP writes:
>Description:
>
> User defined functions always return a value of 0 (including
> logical functions).
>
>Repeat-By:
>
> Compile and execute the following program.
>============================================================
> integer i
> i = 1
> print *, bug(i)
> stop
> end
>
>
> integer function bug(i)
> integer i
>
> bug = 2
> return
> end
>
>Fix:
> Hopefully fixed in 4.3 BSD.
Add this little bit and it runs just fine, thank you. :-)
integer i,bug
(prints '2')
Now, is this a bug or a feature?
The same 'bug' exists in VMS fortran.
(And the same fix applies.)
--
Jim Thompson
{ihnp4,sdcrdcf}!otto!jim
[ Usual disclamer: I have no opinion, therefore I don't exist .]
Technical Details
Message-ID:
<146@otto.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!ittatc!dcdwest!sdcsvax!sdcrdcf!otto!jimReferences:
<3174@sjuvax.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!ittatc!dcdwest!sdcsvax!sdcrdcf!otto!jim From: jim@otto.UUCP (Jim Thompson) Newsgroups: net.lang.f77,net.bugs.4bsd Subject: Re: Subroutine bug with 4.2 BSD F77. Message-ID: <146@otto.UUCP> Date: Wed, 18-Jun-86 07:18:57 EDT Article-I.D.: otto.146 Posted: Wed Jun 18 07:18:57 1986 Date-Received: Sat, 21-Jun-86 08:30:17 EDT References: <3174@sjuvax.UUCP> Reply-To: jim@otto.UUCP (Jim Thompson) Distribution: net Organization: Las Vegas Sun -- Las Vegas, NV Lines: 48