character *(*) fmt
parameter (fmt='(1x,i3,f5.1)')
open(90, status='scratch') ! try a biggish unit number
write(90, '()') ! extra record for interest
write(90, fmt) 123, 123.0
backspace 90 ! backspace problems reported on DOSish systems
read(90, fmt) i, r
endfile 90
if (i/=123 .or. nint(r)/=123) call abort
rewind 90 ! make sure we can rewind too
read(90, '()')
read(90, fmt) i, r
if (i/=123 .or. nint(r)/=123) call abort
close(90)
open(90, status='scratch', access='direct', form='unformatted',
+ recl=8)
write(90, rec=1) 123, 123.0
read(90, rec=1) i, r
if (i/=123 .or. nint(r)/=123) call abort
close(90)
open(90, status='scratch', form='unformatted')
write(90) 123, 123.0
backspace 90
read(90) i, r
if (i/=123 .or. nint(r)/=123) call abort
close(90)
open(90, status='scratch', form='formatted', recl=16,
+ access='direct')
write(90, '(i8,f8.1)',rec=1) 123, 123.0
read(90, '(i8,f8.1)', rec=1) i, r
if (i/=123 .or. nint(r)/=123) call abort
close(90)
end