
set_flag(+PredSpec, +Flag, +Value)

   Sets the flag Flag of the procedure specified by PredSpec to the value
Value.



Arguments
   +PredSpec           Expression of the form Atom/Integer or a list of those.
   +Flag               Atom.
   +Value              Atom.

Type
   Predicate Database and Compiler

Description
   Used to set the value Value of the flag Flag of the procedure(s)
   specified by PredSpec.  The value of a flag may be returned using
   get_flag/3.


   The settable flags, their values and their meanings are:



   ------------------------------------------------------------------
   | Flags       Values     Description                             |
   |----------------------------------------------------------------|
   | leash                  debugger behaviour for this procedure:  |
   |             stop,        trace procedure's ports and stop      |
   |             print,       trace procedure's ports and continue  |
   |             notrace      hide procedure's ports                |
   |                                                                |
   | skip        on, off    procedure will be traced,               |
   |                        but its children will not               |
   |                                                                |
   | spy         on, off    procedure has a spypoint                |
   |                                                                |
   | statistics  on, off    procedure profiling                     |
   |                                                                |
   | parallel    on, off    procedure may be executed in parallel   |
   |                                                                |
   | priority    1..12      default waking priority                 |
   ------------------------------------------------------------------



Resatisfiable
      No.

Fail Conditions
      None.



Exceptions
     4 --- At least one of PredSpec, Flag or Value are not instantiated
     5 --- PredSpec is not an expression of the form Atom/Integer.
     5 --- Flag is not an atom.
     5 --- Value is not an atom.
     6 --- Flag is no flag.
     6 --- Value is no value of the flag Flag.
    30 --- Flag is a read only flag.
    60 --- PredSpec is not defined.

Examples
   
Success:
    [eclipse]: [user].
     pr([]).  % prints the elements of a list
     pr([ S | T ]) :-
            writeln(S),
            pr(T).
     user compiled 484 bytes in 0.00 seconds
    yes.
    [eclipse]: pr([tom, dick]).
    tom
    dick
    yes.
    [eclipse]: set_flag(pr/1, spy, on).
    yes.
    [eclipse]: trace.
    Debugger switched on - creep mode
    yes.
    [eclipse]: pr([tom, dick]).
     +(1) 0  CALL   pr([tom, dick]) (dbg)?- leap
    tom
     +(3) 1  CALL   pr([dick]) (dbg)?- leap
    dick
     +(5) 2  CALL   pr([]) (dbg)?- leap
     +(5) 2  EXIT   pr([]) (dbg)?- leap
     +(3) 1  EXIT   pr([dick]) (dbg)?- leap
     +(1) 0  EXIT   pr([tom, dick]) (dbg)?- leap
    yes.

Error:
    set_flag(X, skip, on).                 (Error 4).
    set_flag("a", spy, on).                (Error 5).
    set_flag(is/2, spy, yes).              (Error 6).
    set_flag(p/2, leash, on).              (Error 60).





See Also
   debug / 0, get_flag / 3, nospy / 1, parallel / 1, pred / 1, skipped / 1, spy / 1, trace / 0, traceable / 1, unskipped / 1, untraceable / 1
