Hi I have program ("expert program") in which user choose few button options and this program search in predicates cars with this checked options. After this I wish to display this one or more predicates in window. This is few line of program. Predicates format:
auto(audi,a4,bialy,sedan,120).
auto(audi,a6,czerwony,sedan,160).
And fragment in which I wish display:
X=auto(Marka,_,Kolor,Nadwozie,Km),
send(Cars,append(text(X))),
I am trying to assign the entire predicate to a variable, and I probably can not. How can I view this data in a different way?
EDIT:
I found class "findall()" which help a lot:
findall(Model,auto(Marka,Model,Kolor,Nadwozie,Km),X),
send(Cars,append(char_array(X))),
Now is ok, in console work, but not in XPCE, Prolog catch error in console:
ERROR: [Thread pce] char_array ->initialise: Argument 1 (text): char_array' expected, found
[a2,a3]'
And what now? I think error is in "char_array(X)" but why this not work?