From 05540fd70bdd95460f9666b6180eb6148ffa8e4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Mon, 6 Jan 2020 07:52:24 -0700 Subject: [PATCH 1/2] Use access = "stream" by default --- src/stdlib_experimental_io.f90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stdlib_experimental_io.f90 b/src/stdlib_experimental_io.f90 index 05f0a256f..6097d735b 100644 --- a/src/stdlib_experimental_io.f90 +++ b/src/stdlib_experimental_io.f90 @@ -335,15 +335,15 @@ integer function open(filename, mode, iostat) result(u) select case (mode_(3:3)) case('t') - access_='sequential' form_='formatted' case('b', 's') - access_='stream' form_='unformatted' case default call error_stop("Unsupported mode: "//mode_(3:3)) end select +access_ = 'stream' + if (present(iostat)) then open(newunit=u, file=filename, & action = action_, position = position_, status = status_, & From f0a68868fb84880f5e3e6f2173bf371df313f22a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Mon, 6 Jan 2020 07:56:18 -0700 Subject: [PATCH 2/2] Update src/stdlib_experimental_io.f90 Co-Authored-By: Jeremie Vandenplas --- src/stdlib_experimental_io.f90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stdlib_experimental_io.f90 b/src/stdlib_experimental_io.f90 index 6097d735b..8a0058c20 100644 --- a/src/stdlib_experimental_io.f90 +++ b/src/stdlib_experimental_io.f90 @@ -336,7 +336,7 @@ integer function open(filename, mode, iostat) result(u) select case (mode_(3:3)) case('t') form_='formatted' -case('b', 's') +case('b') form_='unformatted' case default call error_stop("Unsupported mode: "//mode_(3:3))