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

  1. Xref: sparky comp.lang.fortran:4275 comp.sys.hp:12792
  2. Newsgroups: comp.lang.fortran,comp.sys.hp
  3. Path: sparky!uunet!mcsun!news.funet.fi!network.jyu.fi!sakkinen
  4. From: sakkinen@jyu.fi (Markku Sakkinen)
  5. Subject: Re: Weird HP compiler warning
  6. Message-ID: <1992Nov11.133205.4641@jyu.fi>
  7. Organization: University of Jyvaskyla, Finland
  8. References: <1992Nov10.193635.2736@alchemy.chem.utoronto.ca>
  9. Date: Wed, 11 Nov 1992 13:32:05 GMT
  10. Lines: 34
  11.  
  12. In article <1992Nov10.193635.2736@alchemy.chem.utoronto.ca> mroussel@alchemy.chem.utoronto.ca (Marc Roussel) writes:
  13. > ...
  14. >      double precision h,nexth,err,d2fex
  15. >      h = 1.d0
  16. >      err = 10.d0
  17. >      d2fex = 123.d0
  18. >          nexth = min(h,sqrt(12.d0*err/d2fex))
  19. >      write(*,*)nexth
  20. >      END
  21. >
  22. >For this piece of code, the compiler produces the warning
  23. >
  24. >Warning on line 5 of weird.f: Argument has same name as INTRINSIC function
  25. >
  26. >Of course the argument has the same name as an intrinsic!  The argument
  27. >IS an intrinsic!  Am I going to get this silly warning every time I put
  28. >one intrinsic inside another?  My only comfort is that the program
  29. >executes correctly despite a warning which, to me at least, seems to
  30. >suggest that the compiler didn't get it.
  31.  
  32. No, the argument is NOT an intrinsic, but the result returned
  33. from the call of an intrinsic function.
  34. Thus the compiler is really badly off the track.
  35. Perhaps prepending '+' before 'sqrt' would eliminate the annoying message?
  36.  
  37. ----------------------------------------------------------------------
  38. Markku Sakkinen (sakkinen@jytko.jyu.fi)
  39.        SAKKINEN@FINJYU.bitnet (alternative network address)
  40. Department of Computer Science and Information Systems
  41. University of Jyvaskyla (a's with umlauts)
  42. PL 35
  43. SF-40351 Jyvaskyla (umlauts again)
  44. Finland
  45. ----------------------------------------------------------------------
  46.