home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!cs.utexas.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!eff!news.oc.com!convex!dodson
- From: Dave Dodson <dodson@convex.COM>
- Subject: Re: How does one return a logical value...???
- Originator: dodson@bach.convex.com
- Sender: usenet@news.eng.convex.com (news access account)
- Message-ID: <1992Nov19.154907.9758@news.eng.convex.com>
- Date: Thu, 19 Nov 1992 15:49:07 GMT
- Reply-To: dodson@convex.COM (Dave Dodson)
- References: <BxwrJC.GME@cs.uiuc.edu> <1edccoINNkab@early-bird.think.com>
- Nntp-Posting-Host: bach.convex.com
- Organization: Engineering, CONVEX Computer Corp., Richardson, Tx., USA
- X-Disclaimer: This message was written by a user at CONVEX Computer
- Corp. The opinions expressed are those of the user and
- not necessarily those of CONVEX.
- Lines: 20
-
- >In article <BxwrJC.GME@cs.uiuc.edu>, ctaylor@cs.uiuc.edu (Conrad W Taylor) writes:
- > IF (CheckActivity(previous, ROWS, COLS) .EQ. .TRUE.) THEN
- > uncontrol = uncontrol + 1
- > ENDIF
- >
- > My compiler says that I have mixed types when I use .TRUE. .
-
- The problem is that .EQ. does an arithmetic comparison. If you
- want to do a logical comparison, use .EQV.:
-
- IF (CheckActivity(previous, ROWS, COLS) .EQV. .TRUE.) THEN
-
- or, since CheckActivity (presumably) returns a logical value, just write
-
- IF (CheckActivity(previous, ROWS, COLS)) THEN
-
- ----------------------------------------------------------------------
-
- Dave Dodson dodson@convex.COM
- Convex Computer Corporation Richardson, Texas (214) 497-4234
-