system_getenv(3f) - [M_system:ENVIRONMENT] get environment variable from Fortran by calling get_environment_variable(3f) (LICENSE:PD)
Synopsis
Description
Options
Example
Author
License
function system_getenv(name)character(len=:),allocatable :: system_getenv character(len=*),intent(in) :: name
The system_getenv() function gets the value of an environment variable.
name Return the value of the specified environment variable or blank if the variable is not defined.
Sample setting an environment variable from Fortran:
program demo_system_getenv use M_system, only : system_getenv implicit none write(*,("USER : ",a))system_getenv(USER) write(*,("LOGNAME : ",a))system_getenv(LOGNAME) write(*,("USERNAME : ",a))system_getenv(USERNAME) end program demo_system_getenv
John S. Urban
Public Domain
system_getenv (3) | July 05, 2020 |