# Print\_term/2 operators option not consistent with write\_options ignore\_ops option

**URL:** <https://swi-prolog.discourse.group/t/print-term-2-operators-option-not-consistent-with-write-options-ignore-ops-option/8661>\
**Category:** Data Structure\
**Created:** [December 9, 2024, 9:14pm UTC](https://swi-prolog.discourse.group/t/print-term-2-operators-option-not-consistent-with-write-options-ignore-ops-option/8661 "2024-12-09T21:14:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mike.elston](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/mike.elston/32/3691_2.png) [@mike.elston](https://swi-prolog.discourse.group/u/mike.elston)\
**Post date:** [December 9, 2024, 9:14pm UTC](https://swi-prolog.discourse.group/t/print-term-2-operators-option-not-consistent-with-write-options-ignore-ops-option/8661/1 "2024-12-09T21:14:52Z")

</div>

Hi

The doc for print\_term/2 says:

**operators** (+Boolean)  
This is the inverse of the [write\_term/3](https://www.swi-prolog.org/pldoc/man?predicate=write_term/3) option `ignore_ops`.

but the operators(false) behaves differently to write\_options([ignore\_ops(true)]):

```
?- print_term([div(1/3,7/6)],[operators(false)]).
[1/3 div (7/6)] <<< This seems wrong

?- print_term([div(1/3, 7/6)],[write_options([ignore_ops(true)])]).
[div(/(1,3),/(7,6))] <<< As expected

```

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [December 10, 2024, 9:38am UTC](https://swi-prolog.discourse.group/t/print-term-2-operators-option-not-consistent-with-write-options-ignore-ops-option/8661/2 "2024-12-10T09:38:57Z")

</div>

Thanks. The operators(Ops) and ignore\_ops(IgnOps) in write\_options must be consistent as print\_term/2 uses the first for the high level stuff and small terms are handled by the second. Implemented forced consistency, deprecated the operators(Ops) option and use the write\_options when given.
