The last year, I did neither have much
time to play with Prolog nor time to follow the forum so I may have
missed if this behaviour has been reported before.
In a program I wrote, I used this construct to create a search string that could be passed to xpath/3
atomic_list_concat([Name, '(@type)'], Field), % Name: 'from' or 'to'
xpath(Step, Search1, Type).
The last time that I used this program was probably january 2018 and at that time this still worked.
If I now try to run my code, these lines return an error.
?- Name = 'from', atomic_list_concat([Name, '(@type)'], Field), term_to_atom(Search1, Field).
ERROR: Syntax error: Operator expected
ERROR: ** here **
ERROR: @type) .
After deleting the @, I get this:
?- Name = 'from', atomic_list_concat([Name, '(type)'], Field), term_to_atom(Search1, Field).
Name = from,
Field = 'from(type)',
Search1 = from(type).
The search-string for xpath needs to contain the @.
My question is, did I make an error ( I am not that much experienced in Prolog) or is this a bug?
can't remember when it was the last time that I upgraded Swipl but now I
am using SWI-Prolog (threaded, 64 bits, version 7.7.19-10-g8b9477530).