home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / fortran / 4421 < prev    next >
Encoding:
Internet Message Format  |  1992-11-23  |  1.8 KB

  1. Path: sparky!uunet!cis.ohio-state.edu!zaphod.mps.ohio-state.edu!cs.utexas.edu!tamsun.tamu.edu!snorkelwacker.mit.edu!ai-lab!life.ai.mit.edu!burley
  2. From: burley@apple-gunkies.gnu.ai.mit.edu (Craig Burley)
  3. Newsgroups: comp.lang.fortran
  4. Subject: Re: How does one return a logical value...???
  5. Date: 23 Nov 92 11:02:52
  6. Organization: Free Software Foundation 545 Tech Square Cambridge, MA 02139
  7. Lines: 32
  8. Message-ID: <BURLEY.92Nov23110252@apple-gunkies.gnu.ai.mit.edu>
  9. References: <kf2iy2_00YUo8INXQF@andrew.cmu.edu> <BxzC1x.n0s@news.cso.uiuc.edu>
  10.     <1992Nov20.210324.3906@draco.macsch.com>
  11.     <1emiqnINNrs1@talon.UCS.ORST.EDU>
  12. NNTP-Posting-Host: apple-gunkies.gnu.ai.mit.edu
  13. In-reply-to: pmontgom@math.orst.edu's message of 22 Nov 92 00:04:39 GMT
  14.  
  15. In article <1emiqnINNrs1@talon.UCS.ORST.EDU> pmontgom@math.orst.edu (Peter Montgomery) writes:
  16.  
  17.    In article <1992Nov20.210324.3906@draco.macsch.com>
  18.    dnl@convex.is.macsch.com (David Lombard) writes:
  19.  
  20.    >The following statement is fairly clear:
  21.  
  22.    >    IF( A.EQ.B .EQV. C.EQ.D ) ...
  23.  
  24.    >What would you do with this phantom?
  25.  
  26.    >    IF( A.EQ.B .EQ. C.EQ.D ) ...
  27.  
  28.  
  29.        There is no ambiguity if A, B, C, D are all type logical,
  30.    since logical equality is an associative operation
  31.    (A .EQV. (B .EQV. C))  is equivalent to  ((A .EQV. B) .EQV. C).
  32.    If the operands are numeric, they can be paired off starting from the left.
  33.  
  34. You apparently haven't been reading the thread, so your comment is not helpful.
  35.  
  36. First of all, A, B, C, and D, are _not_ LOGICAL, else the example would be
  37. equivalent to
  38.  
  39.     IF( A.EQV.B .EQV. C.EQV.D ) ...
  40.  
  41. Second of all, I doubt your claim of nonambiguity would hold up well if
  42. you replace, say, the second .EQ./.EQV. with .NE./.NEQV..
  43. --
  44.  
  45. James Craig Burley, Software Craftsperson    burley@gnu.ai.mit.edu
  46. Member of the League for Programming Freedom (LPF) lpf@uunet.uu.net
  47.