Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. 2Dittmar

    Operations on lists.

    I hi think this might be what you are looking for: lts([],[]). lts([H|T1],[H|T2]) :- not(member(H,T1)), lts(T1,T2). lts([H|T1],T2) :- member(H,T1),!, lts(T1,T2). by the way i would define the member/2 predicate like that so you dont get singelton variable warnings...
  2. 2Dittmar

    Database rule help!

    top_person(X) :- is_bewlow(_,X), not(is_below(X,_)). higher(X,Y) :- bewlow(Y,X). higher(X,Y) :- below(Y,X1), higher(X,X1). this of course only works if is_below(X,Y) means that X is below Y, so Y is higher than X. Why do i say this? because u didnt say how to interpret ur fact...
  3. 2Dittmar

    List Search - Complete beginner

    well actually i dont know where to start... the list of things which i have to say is long :) (sorry im just teasing) first of all ur member predicate. i dont know which Prolog you are using but my implementation has already a built-in member predicate. thus i get an error if i start ur script...
  4. 2Dittmar

    Best First Search

    well actually i dont know anything about first search but i tried to make a program that does what u want. I use SWI-Prolog so i am not sure if it works for u. It needs 3 built-in predicates: sub_atom, atom_concat and atom_length first_search(Word1,Word2,Result) :- fs(Word1,Word2,1,Result)...
  5. 2Dittmar

    Need help

    Hello, i made this one for you. Works well for me. dividers(Number,List) :- dv(number,1,List). dv(Number,Number,[Number]). dv(Number,Akk,[Akk|Tail]) :- Number > Akk, 0 is NUmber mod Akk, AkkNew is Akk+1, dv(Number,AkkNew,Tail). dv(Number,Akk,List) :- Number > Akk, not(0...
  6. 2Dittmar

    Graphics.

    i dont know about turbo Prolog but if there is XPCE for it u can use graphics. I use SWI-Prolog where XPCE is integrated. XPCE is a package for object orientated programmin in Prolog. It comes with many defined objects e.g graphicals, windows, dialogs, textitems and all teh stuff u need. I did...

Part and Inventory Search

Back
Top