Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Use explicit formatting in qsavetxt
  • Loading branch information
pdebuyl committed Jan 6, 2020
commit d845f2d590c05ad9580163346baf686ee4ad210e
5 changes: 4 additions & 1 deletion src/stdlib_experimental_io.f90
Original file line number Diff line number Diff line change
Expand Up @@ -218,9 +218,12 @@ subroutine qsavetxt(filename, d)
! call savetxt("log.txt", data)

integer :: s, i
character(len=14) :: format_string

write(format_string, '(a1,i06,a7)') '(', size(d, 2), 'f40.34)'
s = open(filename, "w")
do i = 1, size(d, 1)
write(s, *) d(i, :)
write(s, format_string) d(i, :)
end do
close(s)
end subroutine
Expand Down