![]() |
ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation. |
This is the shell_type class for generating objects to determine the runtime shell type of the operating system. More...
Public Attributes | |
type(shellis_type) | is |
The scalar object of type shellis_type whose logical components indicate the shell name. More... | |
character(1, SK) | dirsep = SK_"/" |
The scalar character of default kind SK of length 1 containing the preferred single-character shell directory separator (e.g., \ (Windows) or / (POSIX or if the shell type is unknown)). More... | |
character(1, SK) | pathsep = SK_":" |
The scalar character of default kind SK of length 1 containing the preferred single-character shell path separator (e.g., ; (Windows) or : (POSIX or if the shell type is unknown)). More... | |
character(:, SK), allocatable | dirseps |
The allocatable scalar character of default kind SK of arbitrary length containing all supported single-character shell directory separators (e.g., \/ (Windows) or / (POSIX or if the shell type is unknown)). More... | |
character(:, SK), allocatable | name |
The allocatable scalar character containing the name of or path to the current shell. More... | |
This is the shell_type class for generating objects to determine the runtime shell type of the operating system.
Note that the system shells are frequently cross-platform.
For example,
See the documentation of shellis_type for details and meaning of the is
component of objects of this type.
Note that both gfortran as of version 12 and Intel ifort as of version 2022 use the Windows Command prompt as the default shell, even if the program is compiled and run from within a POSIX-compliant shell (like Git Bash).
Frequently, the runtime shell sh
is merely a symlink to a more modern shell compatible with Bourne shell.
To ensure the target shell name is correctly inferred, the program will report the target of sh
if it is a symlink.
[out] | failed | : The output scalar logical of default kind LK that is .true. if and only if an error occurs while inferring the system shell name.(optional. If missing and a runtime error occurs, the program will halt by calling error stop .) |
[in,out] | errmsg | : The input/output scalar character of default kind SK of arbitrary length type parameter.If an error occurs, errmsg will be set to a descriptive message about the nature of the runtime error.A length of LEN_IOMSG characters is likely sufficient to capture most error messages in full. (optional. It can be present only if failed is also present. If missing, no error message will be output.) |
shell
: The output scalar object of type shell_type containing the specifics of the runtime system shell.
Possible calling interfaces ⛓
impure
.save
d within the procedures for internal usage in subsequent calls to the procedures.
Example usage ⛓
ifort
compiler ⛓ ifort
compiler ⛓ gfortran
compiler ⛓
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
Definition at line 321 of file pm_sysShell.F90.
character(1, SK) pm_sysShell::shell_type::dirsep = SK_"/" |
The scalar character
of default kind SK of length 1
containing the preferred single-character shell directory separator (e.g., \
(Windows) or /
(POSIX or if the shell type is unknown)).
Definition at line 323 of file pm_sysShell.F90.
character(:, SK), allocatable pm_sysShell::shell_type::dirseps |
The allocatable
scalar character
of default kind SK of arbitrary length containing all supported single-character shell directory separators (e.g., \/
(Windows) or /
(POSIX or if the shell type is unknown)).
Definition at line 325 of file pm_sysShell.F90.
type(shellis_type) pm_sysShell::shell_type::is |
The scalar object of type shellis_type whose logical
components indicate the shell name.
Definition at line 322 of file pm_sysShell.F90.
character(:, SK), allocatable pm_sysShell::shell_type::name |
The allocatable
scalar character
containing the name of or path to the current shell.
Definition at line 326 of file pm_sysShell.F90.
character(1, SK) pm_sysShell::shell_type::pathsep = SK_":" |
The scalar character
of default kind SK of length 1
containing the preferred single-character shell path separator (e.g., ;
(Windows) or :
(POSIX or if the shell type is unknown)).
Definition at line 324 of file pm_sysShell.F90.