Skip to content

Commit bcf6aad

Browse files
committed
Merge branch 'master' of https://github.com/fortran-lang/stdlib into hash_maps
2 parents a8cf88e + 3028a36 commit bcf6aad

13 files changed

+2421
-15
lines changed

doc/specs/stdlib_io.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,18 @@ Loads a rank-2 `array` from a text file.
1717

1818
### Syntax
1919

20-
`call [[stdlib_io(module):loadtxt(interface)]](filename, array)`
20+
`call [[stdlib_io(module):loadtxt(interface)]](filename, array [, skiprows] [, max_rows])`
2121

2222
### Arguments
2323

2424
`filename`: Shall be a character expression containing the file name from which to load the rank-2 `array`.
2525

2626
`array`: Shall be an allocatable rank-2 array of type `real`, `complex` or `integer`.
2727

28+
`skiprows` (optional): Skip the first `skiprows` lines. If skipping more rows than present, a 0-sized array will be returned. The default is 0.
29+
30+
`max_rows` (optional): Read `max_rows` lines of content after `skiprows` lines. A negative value results in reading all lines. A value of zero results in no lines to be read. The default value is -1.
31+
2832
### Return value
2933

3034
Returns an allocated rank-2 `array` with the content of `filename`.
@@ -314,4 +318,4 @@ program demo_fmt_constants
314318
print FMT_COMPLEX_DP, c64 ! outputs: 1.0000000000000000E+002 0.0000000000000000E+000
315319
316320
end program demo_fmt_constants
317-
```
321+
```

0 commit comments

Comments
 (0)