home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!timbuk.cray.com!walter.cray.com!ferris!gerardo
- From: gerardo@ferris.cray.com (Gerardo Cisneros)
- Subject: Re: Upgrading obsolete code
- Message-ID: <1992Sep4.191545.2197@walter.cray.com>
- Keywords: FORTRAN,DECODE,UPGRADE,HOLLERITH
- Organization: Cray Research, Inc.
- References: <1992Sep4.202958.29575@sbcs.sunysb.edu>
- Date: 4 Sep 92 19:15:45 CDT
- Lines: 20
-
- In article <1992Sep4.202958.29575@sbcs.sunysb.edu> mlubran@engws8.ic.sunysb.edu writes:
- >
- >I have to find a way to simulate the effect of the DECODE statement,
- >because MS-FORTRAN 5.0 does not seem to support it. A sample of what
- >[rest deleted]
-
- If I remember ENCODE and DECODE correctly, you can perform their function
- with WRITE and READ on an internal "file" in Fortran 77. Just use
- a character variable or array of the appropriate size in place of
- the unit number. A format _must_ be given; the standard forbids
- list-directed I/O on internal files.
-
- Cheers,
-
- Gerardo
- --
- Gerardo Cisneros |Cray Research de M'exico, S.A. de C.V.
- gerardo.cisneros@cray.com |Camino a Sta. Teresa 480-A #302
- (+52+5)622-8584 |14020 Tlalpan, D.F., MEXICO
- Anything I said sound like an opinion? Then it's no one's but my own.
-