Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit eb81933

Browse files
committed
io: update access mode handling in open function
1 parent c892a74 commit eb81933

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

‎doc/specs/stdlib_io.md‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ Experimental
5252

5353
### Description
5454

55-
Returns the unit number of a file opened to read, to write, or to read and write. The file might be a text file or a binary file. All files are opened using a streamed access.
55+
Returns the unit number of a file opened to read, to write, or to read and write. The file might be a text file or a binary file.
56+
Text files are opened using a sequential access, while binary files are opened using a streamed access.
5657

5758
### Syntax
5859

‎src/stdlib_io.fypp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -460,14 +460,14 @@ contains
460460
select case (mode_(3:3))
461461
case('t')
462462
form_='formatted'
463+
access_='sequential'
463464
case('b')
464465
form_='unformatted'
466+
access_ = 'stream'
465467
case default
466468
call error_stop("Unsupported mode: "//mode_(3:3))
467469
end select
468470

469-
access_ = 'stream'
470-
471471
if (present(iostat)) then
472472
open(newunit=u, file=filename, &
473473
action = action_, position = position_, status = status_, &

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /