FORTRAN 77 Language Reference

Blank Editing (B,BN,BZ)

The B, BN, and BZ edit specifiers control interpretation of imbedded and trailing blanks for numeric input.

The following blank specifiers are available:

Without any specific blank specifiers in the format, nonleading blanks in numeric input fields are normally interpreted as zeros or ignored, depending on the value of the BLANK= suboption of OPEN currently in effect for the unit. The default value for that suboption is ignore, so if you use defaults for both BN/BZ/B and BLANK=, you get ignore.

Example: Read and print the same data once with BZ and once with BN:


demo% cat bz1.f 
*				 12341234 
	CHARACTER LINE*18 / ' 82 82 ' / 
	READ ( LINE, '( I4, BZ, I4 ) ') M, N 
	PRINT *, M, N 
	READ ( LINE, '( I4, BN, I4 ) ') M, N 
	PRINT *, M, N 
	END 
demo% f77 -silent  bz1.f 
demo% a.out 
  82 8200 
  82 82 
demo%

Note these rules for blank control: