Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > e3918135d52936bad0ecc8654eedea12 > files > 86

Falcon-doc-0.9.6.8-1.fc15.noarch.rpm

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html
     PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" >
<head><meta content="text/html;charset=&amp;quot;utf-8&amp;quot;" http-equiv="Content-type"/><link href="faldoc.css" rel="stylesheet" type="text/css"/><title> - Functions</title></head><body class="faldoc"><ul class="navi_top"><li class="top"><a href="index.html">Top: Table of contents</a></li>
         <li class="up"><a href="core.html">Up: The core module</a></li>
         <li class="prev"><a href="core_URI.html">Previous: Class URI</a></li>
         <li class="next"><a href="feathers.html">The Feather Modules</a></li>
         <li class="clear"></li>
         </ul><div id="page_body"><h1><span class="toc_number">1.40</span>Functions</h1><h3><a name="CurrentTime">CurrentTime</a></h3><p class="brief">Returns the current system local time as a TimeStamp instance. </p>
         <pre class="prototype">CurrentTime()</pre>
         <table class="prototype">
         <tbody><tr class="return"><td class="name">Return</td><td class="content">A new TimeStamp instance. </td></tr>
               </tbody>
            </table>
         <p>Returns the current system local time as a TimeStamp instance. The function can never fail. </p>
<h3><a name="ParseRFC2822">ParseRFC2822</a></h3><p class="brief">Parses a RFC2822 formatted date and returns a timestamp instance. </p>
         <pre class="prototype">ParseRFC2822()</pre>
         <table class="prototype">
         <tbody><tr class="return"><td class="name">Return</td><td class="content">A valid <a href="core_TimeStamp.html">TimeStamp</a> instance or nil if the format is invalid. </td></tr>
               </tbody>
            </table>
         <p class="see_also">See also: <a href="core_TimeStamp.html">TimeStamp</a>.</p>
         <h3><a name="attributes">attributes</a></h3><p class="brief">Returns a dictionary containing annotation attributes of the current module. </p>
         <pre class="prototype">attributes()</pre>
         <table class="prototype">
         <tbody><tr class="return"><td class="name">Return</td><td class="content">Nil if the current module has no attributes, or a string-indexed dictionary. </td></tr>
               </tbody>
            </table>
         <p class="see_also">See also: <a href="core_Function.html">Function</a>, <a href="core_Class.html">Class</a>, <a href="core_Object.html">Object</a>.</p>
         <h3><a name="describe">describe</a></h3><p class="brief">Returns the deep contents of an item on a string representation. </p>
         <pre class="prototype">describe( item, [depth],[maxLen] )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">item</td><td class="content"> The item to be inspected. </td></tr>
               <tr class="optparam"><td class="name">depth</td><td class="content"> Maximum inspect depth. </td></tr>
               <tr class="optparam"><td class="name">maxLen</td><td class="content"> Limit the display size of possibly very long items as i.e. strings or membufs. </td></tr>
               </tbody>
            </table>
         <p>This function returns a string containing a representation of the given item. If the item is deep (an array, an instance, a dictionary) the contents are also passed through this function. </p>
<p>This function traverses arrays and items deeply; there isn't any protection against circular references, which may cause endless loop. However, the default maximum depth is 3, which is a good depth for debugging (goes deep, but doesn't dig beyond average interesting points). Set to -1 to have infinite depth. </p>
<p>By default, only the first 60 characters of strings and elements of membufs are displayed. You may change this default by providing a <b>maxLen</b> parameter. </p>
<p>You may create personalized inspect functions using forward bindings, like the following: </p>
<pre>

   compactDescribe = .[inspect depth|1 maxLen|15]
</pre><h3><a name="include">include</a></h3><p class="brief">Dynamically loads a module as a plugin. </p>
         <pre class="prototype">include( file, [inputEnc],[path],[symDict] )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">file</td><td class="content"> The relative filename of the module. </td></tr>
               <tr class="optparam"><td class="name">inputEnc</td><td class="content"> Input encoding. </td></tr>
               <tr class="optparam"><td class="name">path</td><td class="content"> A string of ';' separated search paths. </td></tr>
               <tr class="optparam"><td class="name">symDict</td><td class="content"> Symbols to be queried (or nil). </td></tr>
               <tr class="raise"><td class="name">Raise</td><td class="content"><table>
                     <tbody><tr><td class="name"><a href="core_IoError.html">IoError</a></td><td class="content"> if the module cannot be found or loaded. </td></tr>
                           </tbody>
                        </table>
                     </td></tr>
               </tbody>
            </table>
         <p>A module indicated by filename is compiled, loaded and linked in the running Virtual Machine. The inclusion is relative to the current path, be it set in the script, in the current embedding application or in the falcon command line interpreter. It is possible to use a path relative to the current script path by using the scriptPath variable. </p>
<p>If a dictionary of symbols to be queried is <b>not</b> provided, the module is loaded and its main code, if present, is executed. </p>
<p>If <b>symDict</b> is provided, its keys are strings which refer to symbol names to be searched in the loaded module. If present, the entry are filled with symbols coming from the loaded module. When <b>symDict</b> is provided, the linked module won't have its main code executed (it is possible to execute it at a later time adding "<u>main</u>" to the searched symbols). If a symbol is not found, its entry in the dictionary will be set to nil. When loaded this way, the export requests in the loaded module are <b>not</b> honored (import/from semantic). </p>
<p>The <b>compiler</b> Feather module provides a more complete interface to dynamic load and compilation, but this minimal dynamic load support is provided at base level for flexibility. </p>
<h3><a name="readURI">readURI</a></h3><p class="brief">Reads fully data from a given file or URI source. </p>
         <pre class="prototype">readURI( uri, [encoding] )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">uri</td><td class="content"> The item to be read (URI or string) </td></tr>
               <tr class="optparam"><td class="name">encoding</td><td class="content"> The encoding. </td></tr>
               <tr class="return"><td class="name">Return</td><td class="content">A string containing the whole contents of the given file. </td></tr>
               <tr class="raise"><td class="name">Raise</td><td class="content"><table>
                     <tbody><tr><td class="name"><a href="core_IoError.html">IoError</a></td><td class="content"> in case of read error. </td></tr>
                           </tbody>
                        </table>
                     </td></tr>
               </tbody>
            </table>
         <p>This function reads as efficiently as possible a file from the given source. If encoding isn't given, the file is read as binary data. </p>
<p>Provided encodings are: <ul><li>"utf-8" </li><li>"utf-16" </li><li>"utf-16BE" </li><li>"utf-16LE" </li><li>"iso8859-1" to "iso8859-15" </li><li>"gbk" (Chinese simplified) </li><li>"cp1252" </li><li>"C" (byte oriented -- writes byte per byte) </li></ul></p>
<p class='note'><b>Note:</b> The maximum size of the data that can be read is limited to 2 Gigabytes. </p>
<h3><a name="writeURI">writeURI</a></h3><p class="brief">Writes fully data to a given file or URI source. </p>
         <pre class="prototype">writeURI( uri, data, [encoding] )</pre>
         <table class="prototype">
         <tbody><tr class="param"><td class="name">uri</td><td class="content"> The item to be read (URI or string) </td></tr>
               <tr class="param"><td class="name">data</td><td class="content"> A string or membuf containing the data to be written. </td></tr>
               <tr class="optparam"><td class="name">encoding</td><td class="content"> The encoding. </td></tr>
               <tr class="raise"><td class="name">Raise</td><td class="content"><table>
                     <tbody><tr><td class="name"><a href="core_IoError.html">IoError</a></td><td class="content"> in case of write errors. </td></tr>
                           </tbody>
                        </table>
                     </td></tr>
               </tbody>
            </table>
         <p>This function writes all the data contained in the string or memory buffer passed in the <b>data</b> parameter into the <b>uri</b> output resource. </p>
<p>If <b>encoding</b> is not given, the data is treated as binary data and written as-is. </p>
<p>Provided encodings are: <ul><li>"utf-8" </li><li>"utf-16" </li><li>"utf-16BE" </li><li>"utf-16LE" </li><li>"iso8859-1" to "iso8859-15" </li><li>"gbk" (Chinese simplified) </li><li>"cp1252" </li><li>"C" (byte oriented -- writes byte per byte) </li></ul></p>
</div><ul class="navi_bottom"><li class="top"><a href="index.html">Top: Table of contents</a></li>
         <li class="up"><a href="core.html">Up: The core module</a></li>
         <li class="prev"><a href="core_URI.html">Previous: Class URI</a></li>
         <li class="next"><a href="feathers.html">The Feather Modules</a></li>
         <li class="clear"></li>
         </ul><div class="signature">Made with <a href="faldoc 3.0">http://www.falconpl.org</a></div></body></html>