Logicals and .EQ.

Steve Kargl sgk@troutmask.apl.washington.edu
Fri Jul 8 05:34:00 GMT 2005


On Thu, Jul 07, 2005 at 10:25:53PM -0700, Steve Kargl wrote:
> On Thu, Jul 07, 2005 at 11:15:16PM -0500, Craig Powers wrote:
> > In attempting to build code that currently lives mainly in IFC and
> > occasionally in CVF, I encountered an error on using .EQ. to compare LOGICAL
> > values (as in, IF (<logical variable> == .FALSE.)).  Although this is fixed
> > easily enough to .EQV. instead, I was wondering if it might not be a good
> > idea to allow the .EQ. operation as well.  I have no idea what the standard
> > requires; a glance through an online Compaq Fortran reference manual did not
> > enlighten.
> 
> It would be a bad idea.  Trying using CVF or IFC with whatever
> flags turns on strict Fortran 95 checking.  The correct operator
> is .eqv. as you have found.
> 

BTW, see 7.1.2, 7.2.3, and 7.2.4 of the standard.

-- 
Steve



More information about the Fortran mailing list