FORTRAN 77 Language Reference

Examples

Example 1: Some A, I, and F formats:


       READ( 2, 1 ) PART, ID, HEIGHT, WEIGHT 
1      FORMAT( A8, 2X, I4, F8.2, F8.2 ) 
       WRITE( 9, 2 ) PART, ID, HEIGHT, WEIGHT 
2      FORMAT( 'Part:', A8, ' Id:', I4, ' Height:', F8.2, 
&           ' Weight:', F8.2 ) 

Example 2: Variable format expressions:


       DO 100 N = 1, 50 
       ... 
1      FORMAT( 2X, F<N+1>.2 )