On Saturday, March 12, 2022 at 1:05:12 PM UTC-5, gah4 wrote:
> Tradition is that when you close a scratch file, it goes away.
> You get a new one next time you open one.
>
> Otherwise:
>
> WRITE, REWIND, READ
Got it, thanks. The following program works:
program scratch_file
implicit none
integer, parameter :: iu = 10, n = 25
integer :: i,isq(n)
open (unit=iu,status="scratch")
write (iu,"(i0)") (10*i**2,i=1,n)
rewind (iu)
read (iu,*) isq
print*,isq([1,n]) ! 10 6250
end program scratch_file