Re: sub_atom fails?

Daniel Diaz <[email protected]> Tue, 4 Jul 2017 17:54:17 +0200
Newsgroups gmane.comp.gnu.prolog.general
Message-ID <[email protected]>
gprolog does not have an atom garbage collector. So it is important to control the number of created atoms. 
If this becomes an issue it is better to switch to strings (which are handled as Prolog list of char codes and thus are recovered at backtracking).

Daniel

> Le 3 juil. 2017 à 07:44, David Logan <[email protected]> a écrit :
> 
> Well, it doesn’t seem to be sub_atom as far as it goes. I wrote my own left() in order to do the same job, and the new code still fails with atom table full. At this point, I could use some direction as to why this may be happening. I do not see any nesting situation that would cause this. It appears to me that as I backtrack to the repeat clause, it should remove the atoms that are no longer in use.
> 
> David Logan
> 
> 
>> On Jul 2, 2017, at 3:07 PM, David Logan <[email protected] <mailto:[email protected]>> wrote:
>> 
>> I am trying to use sub_atom to get a substring. It fails with “atom table full.” When I remove that single line and instead hard code some value to “NewPrefix”, it works fine (other than not writing the correct words of course.) Is this a bug, or does anyone know why this would be legitimately failing?
>> 
>> I am not sure how this will arrive at users inboxes, so let me state that I am trying to attach two files: The test prolog file, and the input file I am using.
>> 
>> Thank you,
>> David Logan
>> 
>> 
>> <test5.pl>
>> <wordlist.txt>
> 
> _______________________________________________
> Users-prolog mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/users-prolog

_______________________________________________
Users-prolog mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/users-prolog