#line 31 "/home/travis/build/felix-lang/felix/src/packages/program.fdoc"
  Access environment variables.
  class Env_class[os]
  {
    Separator for filename lists
    virtual fun pathsep: 1 -> string;
  
    Get the value of a given variable.
    Returns empty string if the variable doesn't exist.
    fun getenv:string -> string =
      "::flx::rtl::strutil::atostr(std::getenv($1.c_str()))"
      requires package "flx_strutil", Cxx_headers::cstdlib;
  
    Get the value of a given variable.
    Returns specified default if the variable doesn't exist.
    fun getenv(name:string,dflt:string):string=>let result = getenv(name) in
      if String::len result != 0uz then result else dflt endif
    ;
  
    fun getenvlist (name:string) : list[string] =>
       split (getenv name, #pathsep)
    ;
  }
  
  instance Env_class[Win32] { fun pathsep() => ";"; }
  instance Env_class[Posix] { fun pathsep() => ":"; }
  
  class Env
  {
    if PLAT_WIN32 do
      inherit Env_class[Win32];
    else
      inherit Env_class[Posix];
    done
  }