home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!swrinde!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!hamblin.math.byu.edu!hellgate.utah.edu!lanl!cochiti.lanl.gov!jlg
- From: jlg@cochiti.lanl.gov (J. Giles)
- Subject: Re: How does one return a logical value...???
- Message-ID: <1992Nov23.191651.18561@newshost.lanl.gov>
- Sender: news@newshost.lanl.gov
- Organization: Los Alamos National Laboratory
- References: <kf2iy2_00YUo8INXQF@andrew.cmu.edu> <BxzC1x.n0s@news.cso.uiuc.edu> <1992Nov20.210324.3906@draco.macsch.com>
- Date: Mon, 23 Nov 1992 19:16:51 GMT
- Lines: 24
-
- In article <1992Nov20.210324.3906@draco.macsch.com>, dnl@convex.is.macsch.com (David Lombard) writes:
- |> >[...]
- |>
- |> The following statement is fairly clear:
- |>
- |> IF( A.EQ.B .EQV. C.EQ.D ) ...
- |>
- |> What would you do with this phantom?
- |>
- |> IF( A.EQ.B .EQ. C.EQ.D ) ...
-
- Well, of course you could have written it:
-
- IF((A.EQ.B) .EQ. (C.EQ.D)) ...
-
- Frankly, I'd have put in the extra parenthesis even if you'd used
- the .EQV. operator. Outside the *basics*, precedence is not to be
- relied upon (in some languages, people are advocating the elimination
- of precedence even for the basics - add, vs. multiply for example).
- A few extra parenthesis to reinforce your intent with lesser-used
- operators seems sensible.
-
- --
- J. Giles
-