collecting list items

Discussions related to Visual Prolog
Posts: 2
Joined: 29 May 2014 5:33

collecting list items

Unread post by ally »


Can anyone help me with this please. I would like to have a prolog rules that can collect the items of a list that occurs after the '=' signs.
For example:
A= [tag1=textA[tag2=textB[tag3=textC]]], collectText(A, X).
X= [textA[textB[textC]]]

Thank you in advance,,
User avatar
Thomas Linder Puls
VIP Member
Posts: 1176
Joined: 28 Feb 2000 0:01

Unread post by Thomas Linder Puls »

This is not legal Prolog:

Code: Select all

[tag1=textA[tag2=textB[tag3=textC]]] [textA[textB[textC]]]
So the question does not seem to make sense(!)?
Regards Thomas Linder Puls
Post Reply