The test gfortran.dg/namelist_97.f90 dos not clean the file test.dat

dhumieres.dominique@free.fr dhumieres.dominique@free.fr
Mon Jun 8 11:52:08 GMT 2020


>> Any idea how to clean the file? Meanwhile it could better to rename 
>> the file, say 'namelist_97.dat'.
>> 
> program test
>   character(*), parameter :: my_form = "unformatted"
>   character(*), parameter :: scratch = "scratch"
>   integer      :: i = 1, j = 2, k = 3
>   namelist /nml1/ i, j, k
>   open(unit=10, form=my_form, status=scratch)
>   write(10, nml=nml1)
>   close (unit=10)
> end program test
> 
> should do the job unless there's any need to have a named file...

That seems to work. Thanks.

Dominique


More information about the Fortran mailing list