The B, BN, and BZ edit specifiers control interpretation of imbedded and trailing blanks for numeric input.
The following blank specifiers are available:
BN--If BN precedes a specification, a nonleading blank in the input data is considered null, and is ignored.
BZ--If BZ precedes a specification, a nonleading blank in the input data is considered zero.
B--If B precedes a specification, it returns interpretation to the default mode of blank interpretation. This is consistent with S, which returns to the default sign control. @
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:
Blank control specifiers apply to input only.
A blank control specifier remains in effect until another blank control specifier is encountered, or format interpretation is complete.
The B, BN, and BZ specifiers affect only I, F, E, D, and G editing.