Show
Ignore:
Timestamp:
04/22/08 07:26:38 (6 months ago)
Author:
pmoura
Message:

Improved documentation of the mode/2 predicate directive.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/manuals/refman/directives/mode2.html

    r3560 r4215  
    2626<pre>mode(Mode, Number_of_solutions)</pre> 
    2727<p> 
    28 Most predicates can be used with several instantiations modes. This directive enables the specification of each instantiation mode and the corresponding number of solutions (not necessarily distinct). You may also use this directive for documenting grammar rule non-terminals. 
     28Most predicates can be used with several instantiations modes. This directive enables the specification of each instantiation mode and the corresponding number of solutions (not necessarily distinct). You may also use this directive for documenting grammar rule non-terminals. Multiple directives may be used to specify the same predicate or grammar rule non-terminal. 
    2929</p> 
    3030 
     
    3636<h4>Examples</h4> 
    3737 
    38 <pre>:- mode(append(-, -, +), zero_or_more). 
    39  
    40 :- mode(append(+list, +list, -list), zero_or_one). 
     38<pre>:- mode(atom_concat(?atom, ?atom, +atom), one_or_more). 
     39:- mode(atom_concat(+atom, +atom, -atom), one). 
    4140 
    4241:- mode(var(@term), zero_or_one). 
    4342 
    44 :- mode(arg(-, -, +), error).</pre> 
     43:- mode(solve(+string, -list(atom)), zero_or_one).</pre> 
    4544 
    4645<div class="footer"> 
    4746    <div class="copyright"> 
    4847        <span>Copyright &copy; <a href="mailto:pmoura@logtalk.org">Paulo Moura</a> &mdash; <a href="http://logtalk.org">Logtalk.org</a></span><br/>  
    49         <span>Last updated on: October 26, 2006</span> 
     48        <span>Last updated on: April 21, 2008</span> 
    5049    </div> 
    5150    <div class="navbottom">