home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / fortran / 2787 < prev    next >
Encoding:
Internet Message Format  |  1992-07-21  |  889 b 

  1. Path: sparky!uunet!darwin.sura.net!wupost!waikato.ac.nz!aukuni.ac.nz!ecmtwhk
  2. Newsgroups: comp.lang.fortran
  3. Subject: recursive I/O
  4. Message-ID: <1992Jul21.223157.2775@ccu1.aukuni.ac.nz>
  5. From: ecmtwhk@ccu1.aukuni.ac.nz (Thomas Koenig)
  6. Date: Tue, 21 Jul 1992 22:31:57 GMT
  7. Organization: University of Auckland, New Zealand.
  8. Lines: 16
  9.  
  10. Is the following legal F77?  It works on the UNIX box I'm on at the
  11. moment, but I can imagine trouble with architectures which do not use
  12. a stack for argument passing, for example /370. 
  13.  
  14. C This assumes channels 6 and 0 are preconnected
  15.       PROGRAM MAIN
  16.       WRITE (6,*) FCN(2.3)
  17.       END
  18.       FUNCTION FCN(A)
  19.       IF (A.GT.2.) WRITE (0,*) 'Something horrible happened'
  20.       FCN = 2. - A
  21.       END
  22. -- 
  23. Thomas Koenig, ecmtwhk@ccu1.aukuni.ac.nz, ib09@rz.uni-karlsruhe.de
  24. The joy of engineering is to find a straight line on a double logarithmic
  25. diagram.
  26.