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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

find speed limit

Status
Not open for further replies.

vbx

Programmer
Dec 12, 2010
18
RO
Hello i have a question regarding my project. I have a few clauses link() that take a origin city,destination,spee limit and duration.( Ex:link(Chicago,Detroit,170,6). ). How can I print only the links with the speed below 100 ? How can I querry that ? Thanks in advance.
 
I took a look at findall but i onest dont get it,where to put the condition that speedlimit is < 100.
 
Ok,i did it like this:
speed(X,Y):-link(X,Y,Speed,_),Speed < 100.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top