Contains the definitions of stdout, stdin, stderr, and procedures to interact with the program/system such as producing warnings and stopping the execution of the code while producing error messages
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | parameter | :: | OS_ALL | = | -1 | |
| integer, | public, | parameter | :: | OS_UNKNOWN | = | 0 | |
| integer, | public, | parameter | :: | OS_LINUX | = | 1 | |
| integer, | public, | parameter | :: | OS_MACOS | = | 2 | |
| integer, | public, | parameter | :: | OS_WINDOWS | = | 3 | |
| integer, | public, | parameter | :: | OS_CYGWIN | = | 4 | |
| integer, | public, | parameter | :: | OS_SOLARIS | = | 5 | |
| integer, | public, | parameter | :: | OS_FREEBSD | = | 6 | |
| integer, | public, | parameter | :: | OS_OPENBSD | = | 7 | |
| logical, | public | :: | OS_is_windows |
Is the current operating system Windows ? |
|||
| integer, | public, | parameter | :: | STDIN | = | input_unit |
The file unit associated with standard input |
| integer, | public, | parameter | :: | STDOUT | = | output_unit |
The file unit associated with standard output |
| integer, | public, | parameter | :: | STDERR | = | error_unit |
The file unit associated with standard error |
| integer, | public, | parameter | :: | IOSTAT_OK | = | 0 |
The expected iostat result from a successful call to read() |
| integer, | public | :: | shell_ok |
The expected return value for the current environment and shell. Used in system calls. |
|||
| character(len=5), | public, | parameter | :: | PROGNAME | = | "ROTEX" |
The program name |
| character(len=1), | public | :: | DIRECTORY_SEPARATOR |
The OS-dependent directory separator |
Stop program execution with a message
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in), | optional | :: | message |
Print a warning message, but don't stop the program's execution
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | message |
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | os |
Print error messages to the screen without the WARNING prompt. This will typically precede a call to DIE
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | message |
Detects the type of the operating system. As far as system calls and directory structure go, this basically resolved to Windows or not Windows.
Makes the directory "directory" and checks that it exists and is writeable
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*) | :: | directory |