Changeset 4576 for trunk/manuals

Show
Ignore:
Timestamp:
11/07/08 08:39:07 (2 months ago)
Author:
pmoura
Message:

Added conditional compilation support, as found in some Prolog compilers, using the new directives if/1, elif/1, else/0, and endif/0.

Location:
trunk/manuals/userman
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/manuals/userman/index.html

    r4561 r4576  
    276276        <dd><a href="programming.html#programming_libraries">Libraries of source files</a><span class="leader"></span><span class="page-ref"><span class="programming_libraries"></span></span></dd> 
    277277        <dd><a href="programming.html#programming_portability">Portable programs</a><span class="leader"></span><span class="page-ref"><span class="programming_portability"></span></span></dd> 
     278        <dd><a href="programming.html#programming_cc">Conditional compilation</a><span class="leader"></span><span class="page-ref"><span class="programming_cc"></span></span></dd> 
    278279        <dd><a href="programming.html#programming_errors">Avoiding common errors</a><span class="leader"></span><span class="page-ref"><span class="programming_errors"></span></span></dd> 
    279280        <dd><a href="programming.html#programming_style">Coding style guidlines</a><span class="leader"></span><span class="page-ref"><span class="programming_style"></span></span></dd> 
     
    298299    <div class="copyright"> 
    299300        <span>Copyright &copy; <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> &mdash; <a href="http://logtalk.org">Logtalk.org</a></span><br/> 
    300         <span>Last updated on: October 31, 2008</span> 
     301        <span>Last updated on: November 7, 2008</span> 
    301302    </div> 
    302303    <div class="navbottom"> 
  • trunk/manuals/userman/programming.html

    r4566 r4576  
    4848<p> 
    4949Logtalk is compatible with almost all modern Prolog compilers. However, this does not necessarily imply that your Logtalk programs will have the same level of portability. If possible, you should only use in your programs Logtalk built-in predicates and ISO Prolog specified built-in predicates and arithmetic functions. If you need to use built-in predicates (or built-in arithmetic functions) that may not be available in other Prolog compilers, you should try to encapsulate the non-portable code in a small number of objects and provide a portable <strong>interface</strong> for that code through the use of Logtalk protocols. An example will be code that access operating-system specific features. The Logtalk compiler can warn you of the use of non-ISO specified built-in predicates and arithmetic functions by using the <code>portability/1</code> compiler flag. 
     50</p> 
     51 
     52<h3 id="programming_cc">Conditional compilation</h3> 
     53 
     54<p> 
     55Logtalk supports conditional compilation within source files using the <a title="Consult reference manual" href="../refman/directives/if1.html"><code>if/1</code></a>, <a title="Consult reference manual" href="../refman/directives/elif1.html"><code>elif/1</code></a>, <a title="Consult reference manual" href="../refman/directives/else0.html"><code>else/0</code></a>, and <a title="Consult reference manual" href="../refman/directives/endif0.html"><code>endif/0</code></a> directives. This support is similar to the support found in some Prolog compilers such as ECLiPSe, SWI-Prolog, or YAP. 
    5056</p> 
    5157 
     
    641647    <div class="copyright"> 
    642648        <span>Copyright &copy; <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> &mdash; <a href="http://logtalk.org">Logtalk.org</a></span><br/>  
    643         <span>Last updated on: October 31, 2008</span> 
     649        <span>Last updated on: November 7, 2008</span> 
    644650    </div> 
    645651    <div class="navbottom"> 
  • trunk/manuals/userman/userman.header

    r4572 r4576  
    3636        <span>http://logtalk.org/</span> 
    3737    </p> 
    38     <p class="date">Last updated on October 31, 2008</p> 
     38    <p class="date">Last updated on November 7, 2008</p> 
    3939</div> 
    4040