home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / fortran / 3458 < prev    next >
Encoding:
Internet Message Format  |  1992-09-08  |  1.4 KB

  1. Path: sparky!uunet!gatech!mailer.cc.fsu.edu!sun13!ds8.scri.fsu.edu!jac
  2. From: jac@ds8.scri.fsu.edu (Jim Carr)
  3. Newsgroups: comp.lang.fortran
  4. Subject: Re: Upgrading obsolete code
  5. Keywords: FORTRAN,DECODE,UPGRADE,HOLLERITH
  6. Message-ID: <10612@sun13.scri.fsu.edu>
  7. Date: 6 Sep 92 19:29:18 GMT
  8. References: <1992Sep4.202958.29575@sbcs.sunysb.edu>
  9. Sender: news@sun13.scri.fsu.edu
  10. Reply-To: jac@ds8.scri.fsu.edu (Jim Carr)
  11. Organization: SCRI, Florida State University
  12. Lines: 19
  13.  
  14. In article <1992Sep4.202958.29575@sbcs.sunysb.edu> mlubran@engws8.ic.sunysb.edu writes:
  15. >
  16. >I have to find a way to simulate the effect of the DECODE statement,
  17. >because MS-FORTRAN 5.0 does not seem to support it. A sample of what
  18.  
  19. The functionality of the non-standard DECODE is provided by an 
  20. internal READ in the FORTRAN-77 standard, complete with ERR= handling. 
  21. Look under "internal records and files" or "Records, internal" in 
  22. the index of f77 manual.
  23.  
  24. Your main problem will be that the read wants a CHARACTER variable 
  25. for its input "record" and your code had Hollerith.  Best to convert 
  26. the Hollerith stuff to character strings while updating the code.
  27.  
  28. --
  29. J. A. Carr                                    |  "The New Frontier of which I  
  30. jac@gw.scri.fsu.edu                           |  speak is not a set of promises
  31. Florida State University  B-186               |  -- it is a set of challenges."
  32. Supercomputer Computations Research Institute |   John F. Kennedy (15 July 60)
  33.