home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / fortran / 2791 < prev    next >
Encoding:
Text File  |  1992-07-21  |  1.6 KB  |  39 lines

  1. Newsgroups: comp.lang.fortran
  2. Path: sparky!uunet!mcsun!dxcern!dscomsa.desy.de!dscomsa!ohl
  3. From: ohl@ips103.desy.de (Thorsten Ohl)
  4. Subject: Re: recursive I/O
  5. In-Reply-To: ecmtwhk@ccu1.aukuni.ac.nz's message of Tue, 21 Jul 1992 22:31:57 GMT
  6. Message-ID: <OHL.92Jul22015544@ips103.desy.de>
  7. Sender: news@dscomsf.desy.de (USENET News System)
  8. Nntp-Posting-Host: ips103.desy.de
  9. Organization: Deutsches Elektronen-Synchrotron, Hamburg, Germany.
  10. References: <1992Jul21.223157.2775@ccu1.aukuni.ac.nz>
  11. Date: Wed, 22 Jul 1992 01:55:44 GMT
  12. Lines: 25
  13.  
  14. >>>>> On Tue, 21 Jul 1992 22:31:57 GMT, ecmtwhk@ccu1.aukuni.ac.nz (Thomas Koenig) said:
  15.  
  16. Thomas> Is the following [ = recursive I/O ] legal F77?
  17.  
  18. No!
  19.  
  20. Thomas> It works on the UNIX box I'm on at the moment, but I can
  21. Thomas> imagine trouble with architectures which do not use a stack
  22. Thomas> for argument passing, for example /370.
  23.  
  24. It will certainly fail on S/370 running MVS, but I seem to remember to
  25. have seen a runtime error also on a RS/6000 running AIX 3.1.  The
  26. problem is not only the missing stack, but also that several FORTRAN
  27. I/O subsystems are _not_ reentrant (they seem to use statically
  28. allocated buffers and other nasty things).
  29.  
  30. I try to avoid function calls in I/O lists.   Yes, that costs
  31. additional temporaries, but in large codes it is easy to overlook that
  32. the (n+1)-th level of a nested function call might call the I/O
  33. subsystem.
  34.  
  35. --
  36. ////// Thorsten Ohl, DESY (-T-), Notkestr. 85, W-2000 Hamburg 52, F.R.G.
  37. ///////// net: ohl@crunch.ikp.physik.th-darmstadt.de, ohl@gnu.ai.mit.edu
  38. //////////////////////// voice: +49-40-8998-3699,  fax: +49-40-8998-3282
  39.