Next: AUTOMATIC Statement, Previous: OPEN CLOSE and INQUIRE Keywords, Up: Missing Features
ENCODE and DECODE
g77 doesn't support ENCODE or DECODE.
These statements are best replaced by READ and WRITE statements involving internal files (CHARACTER variables and arrays).
For example, replace a code fragment like
INTEGER*1 LINE(80)
...
DECODE (80, 9000, LINE) A, B, C
...
9000 FORMAT (1X, 3(F10.5))
with:
CHARACTER*80 LINE
...
READ (UNIT=LINE, FMT=9000) A, B, C
...
9000 FORMAT (1X, 3(F10.5))
Similarly, replace a code fragment like
INTEGER*1 LINE(80)
...
ENCODE (80, 9000, LINE) A, B, C
...
9000 FORMAT (1X, 'OUTPUT IS ', 3(F10.5))
with:
CHARACTER*80 LINE
...
WRITE (UNIT=LINE, FMT=9000) A, B, C
...
9000 FORMAT (1X, 'OUTPUT IS ', 3(F10.5))
It is entirely possible that ENCODE and DECODE will
be supported by a future version of g77.