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
@@ -31,7 +31,7 @@ Loads a rank-2 `array` from a text file.
31
31
32
32
`fmt` (optional): Fortran format specifier for the text read. Defaults to the write format for the data type. Setting fmt='*' will specify list directed read.
33
33
34
-
34
+
`delimiter` (optional): Shall be a character expression of length 1 that contains the delimiter used to separate the columns. The default is `' '`.
35
35
36
36
### Return value
37
37
@@ -52,7 +52,8 @@ Experimental
52
52
53
53
### Description
54
54
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.
56
57
57
58
### Syntax
58
59
@@ -105,14 +106,16 @@ Saves a rank-2 `array` into a text file.
Copy file name to clipboardExpand all lines: doc/specs/stdlib_sparse.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -178,7 +178,7 @@ Type-bound procedures to enable requesting data from a sparse matrix.
178
178
179
179
`v` : Shall be a `real` or `complex` value in accordance to the declared sparse matrix object. If the `ij` tuple is within the sparse pattern, `v` contains the value in the data buffer. If the `ij` tuple is outside the sparse pattern, `v` is equal `0`. If the `ij` tuple is outside the matrix pattern `(nrows,ncols)`, `v` is `NaN`.
@@ -257,7 +257,7 @@ This module provides facility functions for converting between storage formats.
257
257
258
258
`chunk`, `optional`: chunk size, only valid in the case of a `SELLC` matrix, by default it will be taken from the `SELLC` default attribute chunk size. It is an `intent(in)` argument.
259
259
260
-
## Example
260
+
###Example
261
261
```fortran
262
262
{!example/linalg/example_sparse_from_ijv.f90!}
263
263
```
@@ -358,7 +358,7 @@ If the `diagonal` array has not been previously allocated, the `diag` subroutine
358
358
359
359
`coo` : Shall be a `COO` type of `real` or `complex` type. It is an `intent(out)` argument.
Copy file name to clipboardExpand all lines: doc/specs/stdlib_system.md
+157
Original file line number
Diff line number
Diff line change
@@ -335,3 +335,160 @@ Returns a `logical` flag: `.true.` if the system is Windows, or `.false.` otherw
335
335
```fortran
336
336
{!example/system/example_process_1.f90!}
337
337
```
338
+
339
+
## `get_runtime_os` - Determine the OS type at runtime
340
+
341
+
### Status
342
+
343
+
Experimental
344
+
345
+
### Description
346
+
347
+
`get_runtime_os` inspects the runtime environment to identify the current OS type. It evaluates environment variables (`OSTYPE`, `OS`) and checks for specific files associated with known operating systems.
348
+
The supported OS types are `integer, parameter` variables stored in the `stdlib_system` module:
349
+
350
+
-**Linux** (`OS_LINUX`)
351
+
-**macOS** (`OS_MACOS`)
352
+
-**Windows** (`OS_WINDOWS`)
353
+
-**Cygwin** (`OS_CYGWIN`)
354
+
-**Solaris** (`OS_SOLARIS`)
355
+
-**FreeBSD** (`OS_FREEBSD`)
356
+
-**OpenBSD** (`OS_OPENBSD`)
357
+
358
+
If the OS cannot be identified, the function returns `OS_UNKNOWN`.
Returns one of the `integer``OS_*` parameters representing the OS type, from the `stdlib_system` module, or `OS_UNKNOWN` if undetermined.
375
+
376
+
### Example
377
+
378
+
```fortran
379
+
{!example/system/example_get_runtime_os.f90!}
380
+
```
381
+
382
+
---
383
+
384
+
## `OS_TYPE` - Cached OS type retrieval
385
+
386
+
### Status
387
+
388
+
Experimental
389
+
390
+
### Description
391
+
392
+
`OS_TYPE` provides a cached result of the `get_runtime_os` function. The OS type is determined during the first invocation and stored in a static variable.
393
+
Subsequent calls reuse the cached value, making this function highly efficient.
394
+
395
+
This caching mechanism ensures negligible overhead for repeated calls, unlike `get_runtime_os`, which performs a full runtime inspection.
0 commit comments