You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/specs/stdlib_io.md
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -261,15 +261,16 @@ Provides formats for all kinds as defined in the `stdlib_kinds` module.
261
261
{!example/io/example_fmt_constants.f90!}
262
262
```
263
263
264
-
## `getfile` - Read a whole ASCII file into a string variable
264
+
## `getfile` - Read a whole ASCII file into a `character` or a `string` variable
265
265
266
266
### Status
267
267
268
268
Experimental
269
269
270
270
### Description
271
271
272
-
This subroutine reads the entirety of a specified ASCII file and returns its content as a string. The function provides an optional error-handling mechanism via the `state_type` class. If the `err` argument is not provided, exceptions will trigger an `error stop`. The function also supports an optional flag to delete the file after reading.
272
+
This subroutine interface reads the entirety of a specified ASCII file and returns its content as a string or an allocatable `character` variable.
273
+
The function provides an optional error-handling mechanism via the `state_type` class. If the `err` argument is not provided, exceptions will trigger an `error stop`. The function also supports an optional flag to delete the file after reading.
273
274
274
275
### Syntax
275
276
@@ -282,7 +283,7 @@ Function
282
283
283
284
`filename`: Shall be a character input containing the path to the ASCII file to read. It is an `intent(in)` argument.
284
285
285
-
`file`: Shall be a `type(string_type)` variable containing the full content of the specified file. It is an `intent(out)` argument.
286
+
`file`: Shall be a `type(string_type)`or an allocatable `character`variable containing the full content of the specified file. It is an `intent(out)` argument.
286
287
287
288
`err` (optional): Shall be a `type(state_type)` variable. It is an `intent(out)` argument used for error handling.
0 commit comments