FORTRAN 77 Language Reference

Examples

Example 1: Simple form of unit specifier:


       ENDFILE 3 
       REWIND 3 
       READ (3,'(I2)') I 
       REWIND 3 
       READ (3,'(I2)')I 

Example 2: REWIND with the UNIT=u form of unit specifier and error trap:


       INTEGER  CODE
       ...
       REWIND (UNIT = 3) 
       REWIND (UNIT = 3, IOSTAT = CODE, ERR = 100) 
       ... 
100       WRITE (*,*) 'error in rewinding'
       STOP