home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!cs.utexas.edu!uwm.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uimrl7.mrl.uiuc.edu!ercolessi
- From: ercolessi@uimrl3.mrl.uiuc.edu (furio ercolessi)
- Subject: Re: How does one return a logical value...???
- References: <kf2iy2_00YUo8INXQF@andrew.cmu.edu>
- Message-ID: <BxzC1x.n0s@news.cso.uiuc.edu>
- Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
- Reply-To: ercolessi@uimrl3.mrl.uiuc.edu (furio ercolessi)
- Organization: MRL - UIUC
- Date: Thu, 19 Nov 1992 20:10:41 GMT
- Lines: 27
-
- In article <kf2iy2_00YUo8INXQF@andrew.cmu.edu>, "Bruno W. Repetto" <br0w+@andrew.cmu.edu> writes:
- |>You should have the following in your calling (sub)program:
- |>
- |> logical CheckActivity
- |>.
- |>.
- |>.
- |> IF (CheckActivity(previous, ROWS, COLS) .EQ. .TRUE.) THEN
- |> uncontrol = uncontrol + 1
- |> ENDIF
-
- while the declaration certainly has to be there, one also has to use .EQV.
- instead of .EQ. as already pointed out in this thread.
-
- but now i was wondering why the writers of the standard
- defined these new operators, .EQV. and .NEQV.
- to a first sight, it seems that overloading .EQ. and .NE. should be
- possible: the compiler would select the operator by looking at the
- operands. Just as .GT. works for both integer and floats.
- Yet, if they did it this way there is probably a good reason.
- Does anybody know why?
-
- --
- Furio Ercolessi
- Materials Research Laboratory | Intl School for Advanced Studies
- Univ. of Illinois at Urbana-Champaign | Trieste, Italy
- furio@uiuc.edu | furio@sissa.it
-