FORTRAN 77 Language Reference

Radix Control (R)

The format specifier is R or nR, where 2 £ n £36. If n is omitted, the default decimal radix is restored.

You can specify radixes other than 10 for formatted integer I/O conversion. The specifier is patterned after P, the scale factor for floating-point conversion. It remains in effect until another radix is specified or format interpretation is complete. The I/O item is treated as a 32-bit integer.

Example: Radix 16--the format for an unsigned, hex, integer, 10 places wide, zero-filled to 8 digits, is (su, 16r, I10.8), as in:

demo% cat radix.f 
	integer i / 110 / 
	write( *, 1 ) i 
1	format( SU, 16r, I10.8 ) 
demo% f77 -silent radix.f 
demo% a.out 

SU is described in "Sign Editing (SU, SP, SS, S) ".