
set_flag(+Flag, ++Value)

   Succeeds if the flag Flag is successfully set to the value Value.



Arguments
   Flag                Atom.
   Value               Atomic or compound term.

Type
   Development Environment and Global Settings

Description
   Used to set the environment flag Flag to the value Value.  The current
   value of a flag may be returned using get_flag/2.  Refer to the
   specification of get_flag/2 for details about each of the environment
   flags.




Modes and Determinism
   set_flag(+, ++) is det

Modules
   This predicate is sensitive to its module context (tool predicate, see @/2).

Exceptions
     4 --- Flag and/or Value are not instantiated.
     5 --- Flag is neither an atom nor a variable.
     5 --- Value is not of the expected type.
     6 --- Flag and/or Value are out of range.
    30 --- Flag is a read-only flag.

Examples
   
Success:
   set_flag(gc,verbose).
   set_flag(syntax_option, no_blanks).
   set_flag(syntax_option, not nl_in_quotes).


   % The following example will set a new library path

   [eclipse]: get_flag(library_path,Path),
      set_flag(library_path, ["/home/myuser/mylibs" | Path]).

   Path = ["/usr/local/ECLIPSE/lib"]
   yes.

Fail:
   set_flag(statistics, some).

Error:
   set_flag(X,a).                (Error  4)
   set_flag("a",x).              (Error  5)
   set_flag(blah, a).            (Error  6)
   set_flag(gc,fred).            (Error  6)
   set_flag(version,1).          (Error 30)





See Also
   get_flag / 2, env / 0, cd / 1, compile / 1, compile / 2, dynamic / 1, pragma / 1, lib / 1
