Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!wanginst!ulowell!miner From: miner@ulowell.UUCP (Richard Miner) Newsgroups: net.lang.f77 Subject: Re: f77 bug: comparing logicals Message-ID: <303@ulowell.UUCP> Date: Sat, 3-May-86 20:48:47 EDT Article-I.D.: ulowell.303 Posted: Sat May 3 20:48:47 1986 Date-Received: Tue, 6-May-86 06:03:53 EDT References: <464@cubsvax.UUCP> Reply-To: miner@ulowell.UUCP (Richard Miner) Organization: University of Lowell Lines: 35 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. > >cccccccccccccccccccccccc BEGIN HERE ccccccccccccccccccccccccccccccccccccccc > write(6,*)'.true. .eq. .true. :', .true. .eq. .true. > write(6,*)'.true. .eq. .false. :', .true. .eq. .false. > write(6,*)'.false. .eq. .false. :', .false. .eq. .false. > > stop > end >cccccccccccccccccccccccc END HERE cccccccccccccccccccccccccccccccccccccccccc The error is not that you get F F F as a result, the error is that the compiler does not complain. .eq. and .ne. are not valid when used with logical variables. They are for checking equalities with numeric variabled not for checking equivalance. You should use .eqv. and .neqv. for checking equivalence of logical variables and values. I found this out when porting our 36,000 line Graphical Kernel System -GKS to the apollo. The F77 compiler on the system is not forgiving at all! The biggest problem is the Brain damaged Fortran compiler under VMS. It lets you get away with too much non-standard code, even if you compile /standard. I will never recomend using VMS with FORTRAN as a development environment, poor tools and as far as I am conserned a nasty compiler. I was talking to a DEC Rep and he said that many people (at DEC) feel you should not port to other environments, what an attitude! Most people have been asking for the GKS in C under Unix anyway. While I am on the subject, we are writing our own Fortran -> C translator, does anyone know of an existing one, in the PD preferably. UUCP: !wanginst!ulowell!miner Rich Miner ARPA: miner@ulowell.CSNET University of Lowell, Comp Sci Dept TALK: (617) 452-5000 x2693 Lowell MA 01854 USA HAL hears the 9000 series is not selling. "Please explain Dave. Why aren't HAL's selling?" Bowman hesitates. "You aren't Amiga compatible."