My code finds facts based on value range:
ara_deger_price(L,H,Res) :-
findall( (Id,B,C,D,Price,F,Points),
( table(Id,B,C,D,Price,F,Points),
\+ Price = null, \+ Price = 'Price', Price > L, Price < H
),
Res).
It gives a list result like so:
?- ara_deger_price(200,250,X).
X = [ (284, 'Viña Cobos 2011 Marchiori Vineyard Block C2 Malbec (Perdriel)', 'Argentina', 'Malbec', 215, 'Michael Schachner', 92), (349, 'Torbreck 2012 RunRig Shiraz-Viognier (Barossa)', 'Australia', 'Shiraz-Viognier', 225, 'Joe Czerwinski', 97)] ;
false.
What I want to do is add every element of this list to a C# listbox. I can access elements using nth0/3 but I want to access every one of them.
I tried this:
show_record([]).
show_record([A|B]) :- write(A), write("\n"), show_record(B).
Which prints every element to one line in the console. Can I redirect the result from console to the listbox or is there a way to access every element in Prolog?