home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!decwrl!purdue!mentor.cc.purdue.edu!ags
- From: ags@mentor.cc.purdue.edu (Dave Seaman)
- Newsgroups: comp.lang.fortran
- Subject: Re: Does your f77 compiler accepts this?
- Message-ID: <BtJyIM.1p2@mentor.cc.purdue.edu>
- Date: 25 Aug 92 18:39:57 GMT
- References: <2873@tansei1.tansei.cc.u-tokyo.ac.jp> <BURLEY.92Aug24145148@geech.gnu.ai.mit.edu> <1992Aug25.153937.26559@newshost.lanl.gov>
- Organization: Purdue University Computing Center
- Lines: 34
-
- In article <1992Aug25.153937.26559@newshost.lanl.gov> ttw@beta.lanl.gov (Tony Warnock) writes:
-
- > WRITE (*,*) (x,x) is legal. It calls for the printing of the
- > COMPLEX variable with real and imaginary parts both equal to x.
-
- > ANSI X3.9-1978 13.6.2 line 6 Page 13-16
-
- The paragraph in question is concerned with complex *constants*.
-
- (2.0,3.0) is an example of a complex constant.
- (X,X) is not a constant, and is not legal Fortran.
-
- If X is a real number, then the complex number X + iX is given in Fortran by
-
- CMPLX(X,X)
-
- where CMPLX is a required intrinsic function in the ANSI standard.
-
- Each of the statements
-
- WRITE (*,*) X
- WRITE (*,*) (X)
- WRITE (*,*) CMPLX(X,X)
-
- is legal Fortran, but
-
- WRITE (*,*) (X,X)
-
- is not.
-
-
- --
- Dave Seaman
- ags@seaman.cc.purdue.edu
-