Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 4fccfe23f6486142b4197d1daac0cf21 > files > 59

Falcon-doc-0.9.6.6-2.fc15.noarch.rpm

<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <title>Function set "Environment support" - Function set "Environment support"</title>
   <link href="faldoc.css" rel="stylesheet" type="text/css"/>
   <link href="tabs.css" rel="stylesheet" type="text/css"/>
</head>
<body class="faldoc_body">
<div class="navitop">
   <div class="tabs">
      <ul>
         <li><a href="./index.html"><span>Main</span></a></li>
         <li><a href="./pages.html"><span>Related pages</span></a></li>
         <li><a href="./groups.html"><span>Groups</span></a></li>
         <li><a href="./funset.html"><span>Function sets</span></a></li>
         <li><a href="./classes.html"><span>Classes</span></a></li>
         <li><a href="./objects.html"><span>Objects</span></a></li>
         <li><a href="./functions.html"><span>All functions</span></a></li>
         <li><a href="./globals.html"><span>Globals</span></a></li>
         
      </ul>
   </div>
</div>
<hr/>

<h1 class="faldoc_title">Function set "Environment support"</h1>

<p class="faldoc_brief">Functions used to access the process environment variables. </p>



   <p class="faldoc_brief"><a href="#more">more...</a></p>
   <h2 class="faldoc_title">Summary</h2>
   <table class="faldoc_list">
   
      
         <tr><td><a href="#getEnviron">getEnviron()</a></td><td>Return a dictionary containing all the environment variables. </td></tr>
      
         <tr><td><a href="#getenv">getenv()</a></td><td>Get environment variable value. </td></tr>
      
         <tr><td><a href="#setenv">setenv()</a></td><td>Set environment variable value. </td></tr>
      
         <tr><td><a href="#unsetenv">unsetenv()</a></td><td>Clear environment variable value. </td></tr>
      
   
   </table>







<a name="more"><h2 class="faldoc_title">Detailed description</h2></a>


<table class="faldoc_function">


</table>
<br/>
<p class="item_brief">Functions used to access the process environment variables. </p>
<p class="faldoc_text">Environment variables are an handful way to provide system wide configuration. Falcon RTL getenv(), setenv() and unsetenv() functions peek and manipulates environment variables. </p>
<p class="faldoc_text">Variables set with "setenv()" will be available to child processes in case they are launched with the utilities in the Process module. </p>




   <h2 class="faldoc_title">Members</h2>
   
      <h3 class="faldoc_funcname"><a name="getEnviron">getEnviron()</a></h3>
      <p class="item_brief">Return a dictionary containing all the environment variables. </p>
      <p class="faldoc_funcdecl">getEnviron</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">A dictionary where each key is an environment variable. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">() </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="getenv">getenv()</a></h3>
      <p class="item_brief">Get environment variable value. </p>
      <p class="faldoc_funcdecl">getenv( varName )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">varName</td><td class="faldoc_paramdesc">Environment variable name (as a string) </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The value of the environment variable or nil if it is not present. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This function returns a string containing the value set for the given environment variable by the operating system before starting the Falcon process or or by a previous call to setenv(). If the given variable name is not declared, the function will return nil. </p>
<p class="faldoc_text">On some systems (e.g. MS-Windows), setting a variable to an empty string is equivalent to unsetting it, so getenv() will never return an empty string. On other systems, environment variables may be set to empty strings, that may be returned by getenv(). </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="setenv">setenv()</a></h3>
      <p class="item_brief">Set environment variable value. </p>
      <p class="faldoc_funcdecl">setenv( varName, value )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">varName</td><td class="faldoc_paramdesc">Environment variable name (as a string) </td></tr><tr><td class="faldoc_param">value</td><td class="faldoc_paramdesc">a value for the given variable. </td></tr>
         
         
         
            <tr><td class="faldoc_raise">Raises:</td><td class="faldoc_raisedesc">
            <table class="faldoc_raise">
            <tr><td class="faldoc_raiseitem"><a href="./class_IoError.html">IoError</a></td><td class="faldoc_raisedesc">on failure. </td></tr>
            </table>
            </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This function sets the given value for the given environment variable. The varName parameter must be a string, while value may be any Falcon value. If the value is not a string, it will be converted using the toString() function. </p>
<p class="faldoc_text">If the variable was previously set to a different value, its value is changed; if it doesn't existed, it is created. </p>
<p class="faldoc_text">The function may fail if the system cannot perform the operation; this may happen if the space that the system reserves for environment variables is exhausted. In this case, the function raises an error. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="unsetenv">unsetenv()</a></h3>
      <p class="item_brief">Clear environment variable value. </p>
      <p class="faldoc_funcdecl">unsetenv( varName )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">varName</td><td class="faldoc_paramdesc">Environment variable name (as a string) </td></tr>
         
         
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This function removes a given variable setting, causing subsequents getenv( varName ) to return nil. </p>
</p>
   

<hr/>
<div class="navibottom">
   <center>
      <a href="./index.html">Main</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./pages.html">Related pages</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./groups.html">Groups</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./funset.html">Function sets</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./classes.html">Classes</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./objects.html">Objects</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./functions.html">All functions</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./globals.html">Globals</a>
   </center>
</div>
</div>
<div class="faldoc_signature">Made with <a href="http://www.falconpl.org">faldoc 2.2.0</div>
</body>
</html>