[UP]


Manual Reference Pages  - system_getenv (3)

NAME

system_getenv(3f) - [M_system:ENVIRONMENT] get environment variable from Fortran by calling get_environment_variable(3f) (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Example
Author
License

SYNOPSIS

function system_getenv(name,default)

    character(len=:),allocatable         :: system_getenv
    character(len=*),intent(in)          :: name
    character(len=*),intent(in),optional :: default

DESCRIPTION

The system_getenv() function gets the value of an environment variable.

OPTIONS

name Return the value of the specified environment variable or blank if the variable is not defined.
default
  If the value returned would be blank this value will be used instead.

EXAMPLE

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

AUTHOR

John S. Urban

LICENSE

Public Domain


system_getenv (3) March 11, 2021
Generated by manServer 1.08 from d138fef5-bd01-4227-ac10-13ae778f4d63 using man macros.