Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!philabs!cmcl2!harvard!husc6!panda!genrad!decvax!ittatc!dcdwest!sdcsvax!sdcrdcf!pmontgom From: pmontgom@sdcrdcf.UUCP (Peter Montgomery) Newsgroups: net.lang.f77 Subject: Re: f77 bug: comparing logicals Message-ID: <2788@sdcrdcf.UUCP> Date: Tue, 6-May-86 21:58:21 EDT Article-I.D.: sdcrdcf.2788 Posted: Tue May 6 21:58:21 1986 Date-Received: Sat, 10-May-86 14:00:36 EDT References: <464@cubsvax.UUCP> Reply-To: pmontgom@sdcrdcf.UUCP (Peter Montgomery) Organization: System Development Corporation R&D, Santa Monica Lines: 20 In article <464@cubsvax.UUCP> peters@cubsvax.UUCP (Peter S. Shenkin) writes: >The following program, compiled with f77, prints "f" for all three >comparisons; under VMS, using dec fortran, the three results are >"T", "F" and "T", as one would expect. > > write(6,*)'.true. .eq. .true. :', .true. .eq. .true. > write(6,*)'.true. .eq. .false. :', .true. .eq. .false. > write(6,*)'.false. .eq. .false. :', .false. .eq. .false. > end > FORTRAN 77 does not permit the .EQ. operator on logical operands. It behaves properly under f77 if the operators are changed from .EQ. to .EQV.. -- Peter Montgomery {aero,allegra,bmcg,burdvax,hplabs, ihnp4,psivax,randvax,sdcsvax,trwrb}!sdcrdcf!pmontgom Don't blame me for the crowded freeways - I don't drive.