This module contains procedures that interact with the programming environment.
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | parameter | :: | OS_ALL | = | -1 | |
| integer, | public, | parameter | :: | OS_CYGWIN | = | 4 | |
| integer, | public, | parameter | :: | OS_FREEBSD | = | 6 | |
| integer, | public, | parameter | :: | OS_LINUX | = | 1 | |
| integer, | public, | parameter | :: | OS_MACOS | = | 2 | |
| integer, | public, | parameter | :: | OS_OPENBSD | = | 7 | |
| integer, | public, | parameter | :: | OS_SOLARIS | = | 5 | |
| integer, | public, | parameter | :: | OS_UNKNOWN | = | 0 | |
| integer, | public, | parameter | :: | OS_WINDOWS | = | 3 | 
Return string describing the OS type flag
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | os | 
Deletes an environment variable for the current environment using the C standard library Returns an error if the variable did not exist in the first place
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name | Variable name | 
get named environment variable value. It it is blank or not set return the optional default value !print , NAME, ” is not defined in the environment. Strange…” !print , “This processor doesn’t support environment variables. Boooh!”
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | NAME | name of environment variable to get the value of | ||
| character(len=*), | intent(in), | optional | :: | DEFAULT | default value to return if the requested value is undefined or blank | 
the returned value
Utility function: return library filename
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | package_name | |||
| logical, | intent(in) | :: | shared | Whether it’s a shared library | ||
| logical, | intent(in) | :: | import | Whether it’s for linking (import library) or actual library | ||
| integer, | intent(in) | :: | target_os | Build target OS: one of OS_WINDOWS, OS_MACOS, … | 
Match os_name to os_type enum (similar to profiles.f90)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | os_name | 
Compare the output of get_os_type or the optional passed INTEGER value to the value for OS_WINDOWS and return .TRUE. if they match and .FALSE. otherwise
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in), | optional | :: | os | 
sample usage
ifort_bug*!character(len=1),save :: sep_cache=’ ‘
Set an environment variable for the current environment using the C standard library
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | name | Variable name | ||
| character(len=*), | intent(in) | :: | value | Variable value | ||
| logical, | intent(in), | optional | :: | overwrite | Should a former value be overwritten? default = .true. | 
Check if os_name is a valid name of a supported OS
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | os_name | Name of an operating system | ||
| logical, | intent(out) | :: | is_valid | Boolean value of whether os_name is valid or not |