home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / fortran / 4754 < prev    next >
Encoding:
Internet Message Format  |  1992-12-16  |  1.9 KB

  1. Path: sparky!uunet!mcsun!uknet!cf-cm!news
  2. From: spxsjm@thor.cf.ac.uk (Mr S J Morris 92)
  3. Newsgroups: comp.lang.fortran
  4. Subject: Reinventing WRITE...
  5. Message-ID: <29011.9212161323@thor.cf.ac.uk>
  6. Date: 16 Dec 92 13:23:01 GMT
  7. Sender: news@cm.cf.ac.uk (Network News System)
  8. Organization: University of Wales College at Cardiff
  9. Lines: 36
  10. X-Mailer: Cardiff Computing Maths PP Mail Open News Gateway
  11.  
  12.  
  13. I want to define a subroutine which will take the same input paramters
  14. as a WRITE procedure; that is, I'd like to define
  15.  
  16.       SUBROUTINE WRITELN(A,B)
  17.       
  18. in such a way that
  19.  
  20.       WRITELN (7,100) X,Y
  21.       WRITELN (6,*) 'HELLO THERE'
  22.       WRITELN (*,*) 'HE''S GETTING CLEVER NOW'
  23.  
  24. all work more or less the same as the corresponding WRITE statements (by
  25. the way, the reason I'm doing this is to open a file, find the endfile
  26. record, append a new record and then close the file again, all in a
  27. single call - so that I can flush the output buffer in SUN Fortran). Is
  28. there a way of doing this, or am I being hopelessly ambitious (I've been
  29. doing some programming in Turbo Pascal for Windows recently, where doing
  30. this would be a doddle), or is there in fact another, easier way of
  31. flushing the buffer on a Sun (cf. the recent thread on how to do the
  32. same on a VAX)?
  33.  
  34. Thanks in advance for any suggestions.
  35.  
  36.  
  37. -- 
  38. Steve Morris,
  39. Adran Ffiseg a Seryddiaeth, Coleg Prifysgol Cymru Caerdydd.
  40. (Physics and Astronomy Dept., UWC Cardiff)
  41. ***************************************************************************
  42. * For God so loved the world that he* Canys felly y carodd Duw y byd fel  *
  43. * gave his only-begotten Son, that  * y rhoddodd efe ei unig-anedig Fab,  *
  44. * whosever believes in him should   * fel na choller pwy bynnag a gredo   *
  45. * not perish but have everlasting   * ynddo Ef, ond caffael ohono fywyd   *
  46. * life.      (John ch.3 v.16)       * tragwyddol.      (Ioan p.3 ad.16)   *
  47. ***************************************************************************
  48.