fortran format specs
dlw at ucbopal.CC.Berkeley.ARPA
dlw at ucbopal.CC.Berkeley.ARPA
Wed Jul 4 12:05:48 AEST 1984
There is NO 'O' edit descriptor in the ANSI X3.9-1978 FORTRAN 77 standard.
Therefore it is not a bug that it "doesn't work". It may be considered
an inconvenience that the compiler doesn't check the format specification
for correctness at compile time, but that is another story.
The 4.2bsd runtime library does include a NON-STANDARD (ie don't use it)
edit descriptor to achieve other than decimal conversion. The 'nR' specifier
defines the 'radix' for subsequent integer conversions. 'n' defaults to 10.
That, in conjunction with another NON-STANDARD descriptor, 'SU' (for unsigned),
allows, for example, a hex dump format something like
format ( su, 16r, 8i10.8 )
Binary, octal, or any radix between 2 and 36 is useable.
The above are described in the 4.2bsd Vol II section 'Introduction to
the f77 I/O Library'.
Having said that, I recently bowed to many requests and added 'O' and 'Z'
to the format conversion routine for 4.2bsd. Like the other non-ANSI
extensions, users who rely on them do so at their own risk.
David Wasley
...!ucbvax!dlw
More information about the Comp.unix.wizards
mailing list