home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / fortran / 4373 < prev    next >
Encoding:
Text File  |  1992-11-19  |  1.5 KB  |  40 lines

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