using "newunit"
This commit is contained in:
parent
c8d490b8be
commit
6094e29efd
@ -7,8 +7,7 @@ program genbloubs
|
||||
character(200) :: filename
|
||||
character(30) :: str
|
||||
type(t_bloubs) :: bloub
|
||||
|
||||
integer, parameter :: idu = 33
|
||||
integer :: idu
|
||||
|
||||
i = IARGC()
|
||||
if (i .ne. 2) then
|
||||
@ -24,14 +23,15 @@ program genbloubs
|
||||
|
||||
! print *, "generating ", nbbloubs, "bloubs to ", filename
|
||||
|
||||
open(unit=idu, file=trim(filename), form='unformatted', &
|
||||
open(newunit=idu, file=trim(filename), form='unformatted', &
|
||||
action='write', status='replace')
|
||||
|
||||
do i = 1, nbbloubs
|
||||
|
||||
bloub%nick = 'noname '
|
||||
bloub%alive = .TRUE.
|
||||
call random_pv(bloub)
|
||||
bloub%radius = 0.028
|
||||
bloub%radius = 0.030
|
||||
bloub%seq = 0
|
||||
|
||||
write(idu) bloub ! no error control ?
|
||||
|
Loading…
Reference in New Issue
Block a user