Skip to content

Commit 522f35e

Browse files
committed
add documentation
1 parent 4a4c135 commit 522f35e

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

doc/specs/stdlib_system.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,3 +417,39 @@ Returns one of the `integer` `OS_*` parameters representing the OS type, from th
417417
```fortran
418418
{!example/system/example_os_type.f90!}
419419
```
420+
421+
## `null_device` - Return the null device file path
422+
423+
### Status
424+
425+
Experimental
426+
427+
### Description
428+
429+
This function returns the file path of the null device, which is a special file used to discard any data written to it.
430+
It reads as an empty file. The null device's path varies by operating system:
431+
- On Windows, the null device is represented as `NUL`.
432+
- On UNIX-like systems (Linux, macOS), the null device is represented as `/dev/null`.
433+
434+
### Syntax
435+
436+
`path = [[stdlib_system(module):null_device(function)]]()`
437+
438+
### Class
439+
440+
Function
441+
442+
### Arguments
443+
444+
None.
445+
446+
### Return Value
447+
448+
- **Type:** `character(:), allocatable`
449+
- Returns the null device file path as a character string, appropriate for the operating system.
450+
451+
### Example
452+
453+
```fortran
454+
{!example/system/example_null_device.f90!}
455+
```

0 commit comments

Comments
 (0)