home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / fortran / 3156 < prev    next >
Encoding:
Text File  |  1992-08-25  |  1.7 KB  |  56 lines

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!europa.asd.contel.com!darwin.sura.net!Sirius.dfn.de!tubsibr!rzphy1.rz.tu-bs.de!i2041101
  3. From: i2041101@rzphy1.rz.tu-bs.de (Paulini)
  4. Subject: Re: Does your f77 compiler accepts this?
  5. Message-ID: <1992Aug25.213754.7260@ibr.cs.tu-bs.de>
  6. Sender: postnntp@ibr.cs.tu-bs.de (nntp inews entry)
  7. Organization: TU Braunschweig, Informatik, Bueltenweg, Germany
  8. References: <2873@tansei1.tansei.cc.u-tokyo.ac.jp> <BURLEY.92Aug24145148@geech.gnu.ai.mit.edu> <1992Aug25.153937.26559@newshost.lanl.gov> <BtJyIM.1p2@mentor.cc.purdue.edu>
  9. Date: Tue, 25 Aug 1992 21:37:54 GMT
  10. Lines: 44
  11.  
  12. In article <BtJyIM.1p2@mentor.cc.purdue.edu>, ags@mentor.cc.purdue.edu 
  13. (Dave Seaman) writes:
  14. |> 
  15. |> The paragraph in question is concerned with complex *constants*.
  16. |> 
  17. |>     (2.0,3.0) is an example of a complex constant.
  18. |>     (X,X) is not a constant, and is not legal Fortran.
  19. |> 
  20. |> If X is a real number, then the complex number X + iX is given in Fortran by
  21. |> 
  22. |>     CMPLX(X,X)
  23. |> 
  24. |> where CMPLX is a required intrinsic function in the ANSI standard.
  25. |> 
  26. |> Each of the statements
  27. |> 
  28. |>     WRITE (*,*) X
  29. |>     WRITE (*,*) (X)
  30. |>     WRITE (*,*) CMPLX(X,X)
  31. |> 
  32. |> is legal Fortran, but
  33. |> 
  34. |>     WRITE (*,*) (X,X)
  35. |> 
  36. |> is not.
  37. |> 
  38. |> 
  39. |> -- 
  40. |> Dave Seaman
  41. |> ags@seaman.cc.purdue.edu
  42.  
  43. (X,X) is a constant if 'X' is defined in a PARAMETER-declaration. Then
  44.  
  45.     WRITE (*,*) (X,X)
  46.  
  47. is legal, otherwise not.
  48.  
  49. -- 
  50. Joachim Paulini                            Phone  0531-391-5190  (voice)
  51.                                            Fax    0531-391-5833
  52. TU Braunschweig                            e-mail i2041101@ws.rz.tu-bs.de
  53. Institut f. Theoretische Physik
  54. Mendelssohnstrasse 3 / 3300 Braunschweig / Germany
  55.  
  56.