Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!dsinc!cs.widener.edu!ukma!xanth!xanth.cs.odu.edu!wayne From: wayne@cs.odu.edu (C Wayne Huling) Newsgroups: comp.lang.prolog Subject: simple question Message-ID: Date: 19 Mar 91 16:29:27 GMT Sender: usenet@cs.odu.edu (Usenet News Poster) Organization: Old Dominion University, Norfolk, VA Lines: 27 Nntp-Posting-Host: offa.cs.odu.edu I am attempting to build a simple list, but can't seem to get it to work. Could someone please help me with this problem? writeln(S):- write(S), nl. query:- writeln('Enter the verticies'), querytop(L), write(L). querytop(L):- read(A), query(A,L). query(end,_):-!. query(A,L):- L=[A|L], writeln('Another one...'), querytop(L). I read the stuff, but it isn't being put in the list, it stops after entering 2 numbers. Why isn't it working?