mctc_env_system Module

Module collecting commands to conveniently interface with system commands


Functions

public function is_unix()

Try to determine if we run on Unix and probably can rely on POSIX compliance

Arguments

None

Return Value logical

Operating system seems to be Unix

public function is_windows()

Try to determine if we run on Windows and don’t have POSIX compliance around

Arguments

None

Return Value logical

Operating system seems to be Windows


Subroutines

public subroutine get_argument(idx, arg)

Obtain the command line argument at a given index

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: idx

Index of command line argument, range [0:command_argument_count()]

character(len=:), intent(out), allocatable :: arg

Command line argument

public subroutine get_variable(var, val)

Obtain the value of an environment variable

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: var

Name of variable

character(len=:), intent(out), allocatable :: val

Value of variable