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