Re: writting anonymous variables in a file

db <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
Ok, thanks a lot for you clear explanation.
I will use numbervars.

Cheers
Dominique


Le 03/02/2014 16:51, Jan Wielemaker a écrit :
> Yes, that can happed. Similarly, writing p(_X, _Y) and later p(_X, _Z)
> might cause the _X not to be the same. It just can't work for non-ground
> terms. Using numbervars or some other way to name the variables is the
> only thing that can work. The _GXXXX names are simple not stable and,
> AFAIK, that is the case in all Prolog system I know about that have a
> garbage collector.
>
> Note that numbervars binds your variables, so you typically do
>
>      \+ \+ ( numbervars(Term, 0, _, [singletons(true)]),
>          <do the actual writing>
>            ).

_______________________________________________
SWI-Prolog mailing list
[email protected]
https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.