Show
Ignore:
Timestamp:
07/15/08 09:37:48 (4 months ago)
Author:
pmoura
Message:

Improved documentation on the use of the predicate directive dynamic/1 in categories.

Files:
1 modified

Legend:

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

    r4213 r4379  
    144144 
    145145<p> 
    146 An object (or category) predicate can be static or dynamic. By default, all object predicates are static. To declare a dynamic predicate we use the <a title="Consult reference manual" href="../refman/directives/dynamic1.html"><code>dynamic/1</code></a> directive: 
     146An object predicate can be static or dynamic. By default, all object predicates are static. To declare a dynamic predicate we use the <a title="Consult reference manual" href="../refman/directives/dynamic1.html"><code>dynamic/1</code></a> directive: 
    147147</p> 
    148148<pre>:- dynamic(foo/1).</pre> 
    149149<p> 
    150 This directive may also be used to declare dynamic grammar rule non-terminals. As each Logtalk entity is compiled independently from other entities, this directive must be included in every object or category that contains a definition for the described predicate (even if the predicate declaration is inherited from other entity). If we omit the dynamic declaration then the predicate definition will be compiled to static code. Note that any static object may declare and define dynamic predicates. 
     150This directive may also be used to declare dynamic grammar rule non-terminals. As each Logtalk entity is compiled independently from other entities, this directive must be included in every object that contains a definition for the described predicate (even if the predicate declaration is inherited from other object or imported from a category). If we omit the dynamic declaration then the predicate definition will be compiled to static code. Note that any static object may declare and define dynamic predicates. 
    151151</p> 
    152152 
     
    676676    <div class="copyright"> 
    677677        <span>Copyright &copy; <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> &mdash; <a href="http://logtalk.org">Logtalk.org</a></span><br/>  
    678         <span>Last updated on: April 21, 2008</span> 
     678        <span>Last updated on: July 15, 2008</span> 
    679679    </div> 
    680680    <div class="navbottom">