home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / lifeos2.zip / LIFE-1.02 / LIB / CONTROL.LF < prev    next >
Text File  |  1996-06-04  |  445b  |  20 lines

  1. %    $Id: control.lf,v 1.2 1994/12/08 23:56:49 duchier Exp $    
  2. module("control") ?
  3.  
  4. public(catch,throw)?
  5.  
  6. add_man([catch,throw],
  7.     " catch(X), throw(X): control utilities.
  8.  
  9.   throw(X) causes backtracking to the choice point created before the 
  10.   call to catch(X).
  11.  
  12.   X is bound to a choice point. It may be convenient to use a global (non
  13.   persistent) variable to store it.
  14.   ") ?
  15.  
  16.       
  17. catch(X) :- X <- get_choice.
  18. throw(X) :- set_choice(X),fail.
  19.  
  20.