FORTRAN 77 Language Reference

Reading Into Hollerith Edit Descriptors

For compatibility with older programs, f77 also allows READs into Hollerith edit descriptors. @

Example: Read into hollerith edit descriptor--no list in the READ statement:


demo% cat hol1.f 
	WRITE( *, 1 ) 
1 	FORMAT( 6Holder ) 
	READ( *, 1 ) 
	WRITE( *, 1 ) 
	END 
demo% f77 hol1.f 
hol1.f: 
 MAIN 
demo% a.out 
older 
newer 
newer 
demo%

In the above code, if the format is a runtime format (variable format), then the reading into the actual format does not work, and the format remains unchanged. Hence, the following program fails:


	CHARACTER F*18 / '(A8)' / 
	READ(*,F)			! ¨ Does not work.
	... 

Obviously, there are better ways to read into the actual format.