Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > f448deafa1de20c56618e7ac9c6ef5d7 > files > 20

Falcon-doc-0.9.6.6-1.fc14.noarch.rpm

<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <title>Class Integer - Class Integer</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">Class Integer</h1>

<p class="faldoc_brief">Integer type basic object model metaclass. </p>
<p class="faldoc_funcdecl">
<b>class</b> Integer \
      <b>from</b> <a href="./class_BOM.html">BOM</a>
</p>


   
   <h2 class="faldoc_title">Summary</h2>
   <table class="faldoc_list">
   
      
         <tr><td><a href="#downto">downto()</a></td><td>Repeats a function or a sequence until the lower limit is reached. </td></tr>
      
         <tr><td><a href="#ptr">ptr()</a></td><td>Returns the value itself. </td></tr>
      
         <tr><td><a href="#times">times()</a></td><td>repeats a sequence a given number of times. </td></tr>
      
         <tr><td><a href="#upto">upto()</a></td><td>Repeats a function or a sequence until the upper limit is reached. </td></tr>
      
   
   </table>





   <h3 class="faldoc_title">Inherited methods</h3>
   <table class="faldoc_list">
   
      <tr><td><a href="./class_BOM.html#__add">__add</a> from BOM&nbsp;</td><td>Overrides binary addition operand. </td></tr>
   
      <tr><td><a href="./class_BOM.html#__call">__call</a> from BOM&nbsp;</td><td>Overrides call operator "self()". </td></tr>
   
      <tr><td><a href="./class_BOM.html#__dec">__dec</a> from BOM&nbsp;</td><td>Overrides decrement unary prefix operand. </td></tr>
   
      <tr><td><a href="./class_BOM.html#__decpost">__decpost</a> from BOM&nbsp;</td><td>Overrides decrement unary postfix operand. </td></tr>
   
      <tr><td><a href="./class_BOM.html#__div">__div</a> from BOM&nbsp;</td><td>Overrides binary division operand. </td></tr>
   
      <tr><td><a href="./class_BOM.html#__getIndex">__getIndex</a> from BOM&nbsp;</td><td>Overrides array access operator [] </td></tr>
   
      <tr><td><a href="./class_BOM.html#__inc">__inc</a> from BOM&nbsp;</td><td>Overrides increment unary prefix operand. </td></tr>
   
      <tr><td><a href="./class_BOM.html#__incpost">__incpost</a> from BOM&nbsp;</td><td>Overrides increment unary postifx operand. </td></tr>
   
      <tr><td><a href="./class_BOM.html#__mod">__mod</a> from BOM&nbsp;</td><td>Overrides modulo operand. </td></tr>
   
      <tr><td><a href="./class_BOM.html#__mul">__mul</a> from BOM&nbsp;</td><td>Overrides binary multiplication operand. </td></tr>
   
      <tr><td><a href="./class_BOM.html#__pow">__pow</a> from BOM&nbsp;</td><td>Overrides power operand. </td></tr>
   
      <tr><td><a href="./class_BOM.html#__setIndex">__setIndex</a> from BOM&nbsp;</td><td>Overrides array write operator [] </td></tr>
   
      <tr><td><a href="./class_BOM.html#__sub">__sub</a> from BOM&nbsp;</td><td>Overrides binary subtraction operand. </td></tr>
   
      <tr><td><a href="./class_BOM.html#baseClass">baseClass</a> from BOM&nbsp;</td><td>Returns the class item from which an object has been instantiated. </td></tr>
   
      <tr><td><a href="./class_BOM.html#bound">bound</a> from BOM&nbsp;</td><td>Determines if an item is bound or not. </td></tr>
   
      <tr><td><a href="./class_BOM.html#className">className</a> from BOM&nbsp;</td><td>Returns the name of the class an instance is instantiated from. </td></tr>
   
      <tr><td><a href="./class_BOM.html#clone">clone</a> from BOM&nbsp;</td><td>Performs a deep copy of the item. </td></tr>
   
      <tr><td><a href="./class_BOM.html#compare">compare</a> from BOM&nbsp;</td><td>Performs a lexicographical comparison. </td></tr>
   
      <tr><td><a href="./class_BOM.html#derivedFrom">derivedFrom</a> from BOM&nbsp;</td><td>Checks if this item has a given parent. </td></tr>
   
      <tr><td><a href="./class_BOM.html#describe">describe</a> from BOM&nbsp;</td><td>Returns the deep contents of an item on a string representation. </td></tr>
   
      <tr><td><a href="./class_BOM.html#isCallable">isCallable</a> from BOM&nbsp;</td><td>Determines if an item is callable. </td></tr>
   
      <tr><td><a href="./class_BOM.html#len">len</a> from BOM&nbsp;</td><td>Retrieves the length of a collection </td></tr>
   
      <tr><td><a href="./class_BOM.html#metaclass">metaclass</a> from BOM&nbsp;</td><td>Returns the metaclass associated with this item. </td></tr>
   
      <tr><td><a href="./class_BOM.html#ptr">ptr</a> from BOM&nbsp;</td><td>Returns a raw memory pointer out of this data (as an integer). </td></tr>
   
      <tr><td><a href="./class_BOM.html#serialize">serialize</a> from BOM&nbsp;</td><td>Serialize the item on a stream for persistent storage. </td></tr>
   
      <tr><td><a href="./class_BOM.html#toString">toString</a> from BOM&nbsp;</td><td>Coverts the object to string. </td></tr>
   
      <tr><td><a href="./class_BOM.html#typeId">typeId</a> from BOM&nbsp;</td><td>Returns an integer indicating the type of this item. </td></tr>
   
   </table>





   <h2 class="faldoc_title">Methods</h2>
   
      <h3 class="faldoc_funcname"><a name="downto">downto()</a></h3>
      <p class="item_brief">Repeats a function or a sequence until the lower limit is reached. </p>
      <p class="faldoc_funcdecl">Integer.downto( llimit, sequence )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">llimit</td><td class="faldoc_paramdesc">The lower limit of the loop. </td></tr><tr><td class="faldoc_param">sequence</td><td class="faldoc_paramdesc">The sequence or function to be repeated. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The last index processed. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This method repeats a loop from this integer down to the limit value included. If the limit is greater than this integer, the function returns immediately. </p>
<p class="faldoc_text">If the sequence is a function, then it is called iteratively with the current index value as last parameter. If it is a sequence, it is functionally evaluated and the &1 parametric binding is set to the index. </p>
<pre class="faldoc_code">
 5.downto( 2, printl )
 3.downto(0, .[printl "Value number " &1])
</pre>
<p class="faldoc_text">In both cases, returning an oob(0) will cause the loop to terminate, while returning an oob(1) from any evaluation in the sequence makes the rest of the evaluation to be skipped and the loop to be restarted. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="ptr">ptr()</a></h3>
      <p class="item_brief">Returns the value itself. </p>
      <p class="faldoc_funcdecl">Integer.ptr( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The value in this integer. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">Falcon integers can be used to store memory locations, as the are granted to be wide at least as the widest pointer on the target platform. For this reason, they can be used to transport raw pointers coming from external libraries. </p>
<p class="faldoc_text">This function override ensures that .ptr() applied to an integer returns the original integer value (and doesn't get mangled as with other ptr overrides). </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="times">times()</a></h3>
      <p class="item_brief">repeats a sequence a given number of times. </p>
      <p class="faldoc_funcdecl">Integer.times( sequence )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">sequence</td><td class="faldoc_paramdesc">Function or sequence to be repeated. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">Last index processed. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text"> This method works exactly as the <b>times</b> function when the first parameter is a number. </p>
</p>
   
      <h3 class="faldoc_funcname"><a name="upto">upto()</a></h3>
      <p class="item_brief">Repeats a function or a sequence until the upper limit is reached. </p>
      <p class="faldoc_funcdecl">Integer.upto( llimit, sequence )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">llimit</td><td class="faldoc_paramdesc">The upper limit of the loop. </td></tr><tr><td class="faldoc_param">sequence</td><td class="faldoc_paramdesc">The sequence or function to be repeated. </td></tr>
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">The last index processed. </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This method repeats a loop from this integer down to the limit value included. If the limit is less than this integer, the function returns immediately. </p>
<p class="faldoc_text">If the sequence is a function, then it is called iteratively with the current index value as last parameter. If it is a sequence, it is functionally evaluated and the &1 parametric binding is set to the index. </p>
<pre class="faldoc_code">
 2.upto( 5, printl )
 2.downto(5, .[printl "Value number " &1])
</pre>
<p class="faldoc_text">In both cases, returning an oob(0) will cause the loop to terminate, while returning an oob(1) from any evaluation in the sequence makes the rest of the evaluation to be skipped and the loop to be restarted. </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>