Assign a value to flag. In standard Prolog Flags are reserved atoms that are used for retrieving settings from the prolog processor or to change settings in the processor. There are unchangeable flags and there are flags that can be changed. The flag parameter must be an instantiated atom (not a variable) that indicates which flag must be changed. The term parameter shall remain unchanged.
The changeable Prolog flags are in the table below. For all possible Prolog flags see current_prolog_flag/2.
see also: current_prolog_flag/2 show_console/0
| Flag name | Valid values | Description |
| debug | on, off | this flag has no effect in Trinc-Prolog (ISO). |
| double_quotes | chars, codes, atom | This flag has effect how double quoted lists are prepared for execution. If the value is chars a double quoted list is input as a list of one character atoms. If the value is codes a double quoted list is input as a list of character codes and if the value is atom a double quoted list is input as an atom (ISO). The default value is atom. |
| char_conversion | on, off | If the value is on, unquoted characters in Prolog texts being prepared for execution or when inputting terms are converted according to the current character conversion table (ISO). |
| unknown | error, warning, fail | This flags determines the behavior of the Prolog processor
when it encounters a goal for which no predicate exists (ISO).
|
| max_printdepth | < integer larger than 0> | Sets the maximum depth of the expression printer of the Prolog processor. (not standard Prolog) |
| max_matchdepth | < integer larger than 0> | Sets the maximum depth of the expression matcher of the Prolog processor. (not standard Prolog) |
| dbview | immediate, logical | This flags determines how the prolog processor treats asserted and retracted clauses. For more information see: the database views. (not standard prolog) |
| console_newline | on, off | This flag determines if the console window will remove newline characters or leave them in the input stream of the console window. The default value of this flag is on; newline characters are inserted into the input stream. |
| iso_prolog | on, off | This flag determines if the ISO Prolog mode is on or off. If this mode is on then only built-in predicates defined in the ISO Prolog standard are recognized as built-in predicates and the OO extensions of Trinc-Prolog are regarded as syntax errors. |
| lco | on, off | This flag determines if the last-call optimization is on or off. If this optimization is on then Trinc-Prolog will attempt to detect if a certain goal can be redone and if this is not the case then it will remove choicepoints for that goal from the inference stack. Enabling this optimization can reduce the amount of memory required for proving a goal. |
| num_digits | <a positive integer> | Set the maximum number of digits for converting a floating-point number to a string. This is done if the result of an arithmetic expression is converted to a readable representation. This parameter thus determines how many characters are used for representing a number, the default value is 15. This value must be increased when working with very large numbers. |
| argument_indexing | on, off | Turn argument indexing optimalisation on or off. If argument indexing is on then clauses that for certain will cause a mismatch with the current goal are not considered. This option will speed up program execution. |
| max_send_http_server | < integer larger than 0> | The maximum number of attempts for sending a request for proving a goal to a HTTP server. The default number is 3. |
| print_double_quotes | <none> | Provided for backwards compatibility but has no effect anymore since R3B. |
| expand_backslash | <none> | Provided for backwards compatibility but has no effect anymore since R3B. |
| Exceptions | |
| Flag or Value is a variable | an instantiation_error exception is thrown |
| Flag is neither a variable nor an atom | a type_error(atom, Flag) exception is thrown |
| Flag is an atom but an invalid flag for the processor | a domain_error(prolog_flag, Flag) exception is thrown |
| Flag is an atom and a valid flag but Value is inappropriate for Flag | a domain_error(flag_value, Flag + Value) exception is thrown |
| Flag is an atom and a valid flag and Value is appropriate, but Flag is not changeable | a permission_error(modify, flag, Flag) exception is thrown |