Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!panda!husc6!harvard!seismo!umcp-cs!nbs-amrf!anderson From: anderson@nbs-amrf.UUCP (Bill Anderson) Newsgroups: net.lang.f77,net.bugs.4bsd Subject: Re: Subroutine bug with 4.2 BSD F77. Message-ID: <335@nbs-amrf.UUCP> Date: Tue, 17-Jun-86 15:09:09 EDT Article-I.D.: nbs-amrf.335 Posted: Tue Jun 17 15:09:09 1986 Date-Received: Sat, 21-Jun-86 08:25:11 EDT References: <3174@sjuvax.UUCP> Distribution: net Organization: National Bureau of Standards Lines: 31 Xref: watmath net.lang.f77:555 net.bugs.4bsd:2187 > 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. You need to specify the type for bug (i.e. integer bug). Bill Anderson, NBS ...!seismo!nbs-amrf!anderson