Annotation of researchv10no/cmd/f77/f77.fixes, revision 1.1.1.1

1.1       root        1: Bug fixes to f77 installed 30 June 1989:
                      2: 
                      3: 1. The type of PARAMETERs is now honored.  Previously, the type was
                      4:    deduced from the assigned constant, so, e.g.,
                      5:        DOUBLE PRECISION ONE
                      6:        PARAMETER (ONE = 1.0)
                      7:    resulted in ONE being a REAL constant.
                      8: 
                      9: 2. As the Fortran 77 specifies, a comma is now allowed after the
                     10:    label in a DO statement, e.g.
                     11:        DO 10, i = 1, n
                     12: 
                     13: 3. A statement function argument can be subscripted variable of same
                     14:    name as the dummy argument used in defining the statement function.
                     15:    For example,
                     16: 
                     17:        REAL X(5)
                     18:        F(X) = X**2
                     19:        ...
                     20:        Y = F(X(2))
                     21:        
                     22: 4. The calling sequence expected by procedures (functions and subroutines)
                     23:    has been adjusted to match the calling sequence that has long been
                     24:    passed.  Previously, procedures expected a length parameter to
                     25:    accompany procedure arguments.  This change only matters in an
                     26:    example like the following, in which a CHARACTER argument follows
                     27:    a procedure argument:
                     28:        CHARACTER *30 TITLE
                     29:        EXTERNAL GOO
                     30:        TITLE = 'HERE''S ABOUT THIRTY CHARACTERS'
                     31:        CALL FOO(GOO, TITLE)
                     32:        END
                     33:        SUBROUTINE FOO(GOO, T)
                     34:        EXTERNAL GOO
                     35:        CHARACTER *(*) T
                     36:        WRITE(6,'(1X,2A)') 'FOO: ', T
                     37:        CALL GOO(T)
                     38:        END
                     39:        SUBROUTINE GOO(T)
                     40:        CHARACTER *(*) T
                     41:        WRITE(*,*) 'GOO: ', T
                     42:        END
                     43: 
                     44:    This bug fix also eliminates the old warning
                     45:    "Dummy procedure not declared EXTERNAL. Code may be wrong."
                     46:        
                     47: 5. DATA statements with general implied DOs now work.  Previously only
                     48:    an initial, singly nested DO worked.  Examples that previously
                     49:    failed (with different error messages):
                     50: 
                     51:         INTEGER IXVI, JXVI, KX1I(2), MX2I(2,2)
                     52:         DATA IXVI, JXVI, KX1I(2),
                     53:      1     ((MX2I(IVI, JVI), IVI=1,2), JVI=1,2) /5, 6, 8, 4*4/
                     54:        write(*,*) ixvi, jxvi, kx1i(2), mx2i
                     55:         END
                     56: 
                     57:         integer IXVI, MX2I(2,2)
                     58:         DATA IXVI, ((MX2I(IVI, JVI), IVI=1,2), JVI=1,2) /5, 4*4/
                     59:        write(*,*) ixvi, mx2i
                     60:         END
                     61: 
                     62: 6. A loop like "DO 10 i = 1, 1, -1" no longer has its range omitted.
                     63: 
                     64: 7. ASSIGNed FORMAT labels work.
                     65: 
                     66: 8. New flags -b and -B are now available: -b warns when the above bug
                     67:    fixes affect generated objects; -B causes f77 to revert to the
                     68:    previous buggy behavior.  These are meant as debugging aids ("Why
                     69:    am I now getting different answers?") and as portability aids --
                     70:    some compilers derived from f77 retain some of the above bugs.
                     71: 
                     72: 9. The default maximum number of statement labels is now larger, so
                     73:    it should less often be necessary to rerun f77 specifying -Ns402 .
                     74: 
                     75: 10. Statement functions among executable statements are now always
                     76:     disallowed.  Previously, if there were DATA statements, then
                     77:     an unintended "extension" allowed statement function definitions
                     78:     to appear among the executables.  (Statement function definitions
                     79:     may appear among DATA statements, but not after the first
                     80:     executable statement.)
                     81: 
                     82: Please send further bug reports to dmg.

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.