GRASP
Functions/Subroutines
cpath.f90 File Reference

Functions/Subroutines

subroutine cpath (startdir, permdir, tmpdir)
 
logical function getenv_allocating (variable_name, value)
 Fetches an environment variable. More...
 

Function/Subroutine Documentation

◆ cpath()

subroutine cpath ( character(len=*), intent(out startdir,
character(len=*), intent(out permdir,
character(len=*), intent(out tmpdir 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getenv_allocating()

logical function cpath::getenv_allocating ( character(*), intent(in variable_name,
character(:), intent(inout), allocatable  value 
)

Fetches an environment variable.

If it was able to fetch the variable value, returns .true. and sets value to the value ([re]allocating if necessary). Returns .false. if the variable is not defined

Under the hood it calls get_environment_variable, but it properly allocates or re-allocates the value to match the actual length of the environment variable.

TODO: For this to be a proper library function, it should be implemented as an interface with additional methods to handle pointers and fixed-length strings.

Here is the caller graph for this function: