private void showSubscriberFeedsResultList(Var resultList) { System.Console.Out.WriteLine("\nAll Subscriber Feeds:"); Struct feedList = (Struct)resultList.getTerm(); while (!feedList.isEmptyList()) { Struct subscriberFeed = (Struct)feedList.getArg(0) .getTerm(); feedList = (Struct)feedList.getArg(1).getTerm(); // System.Console.Out.WriteLine(" " + subscriberFeed.ToString()); Struct subscriber = (Struct)subscriberFeed.getArg(0) .getTerm(); Struct articleList = (Struct)subscriberFeed.getArg(1) .getTerm(); // System.Console.Out.WriteLine(" " + subscriber.getName() + " " // + articleList.ToString()); System.Console.Out.WriteLine("\n Feed for " + subscriber.getName() + ":"); while (!articleList.isEmptyList()) { Struct article = (Struct)articleList.getArg(0) .getTerm(); articleList = (Struct)articleList.getArg(1) .getTerm(); String articleId = PrologLibrary .stringValueFromTerm(article.getArg(0)); String provider = PrologLibrary .stringValueFromTerm(article.getArg(1)); String contents = PrologLibrary .stringValueFromTerm(article.getArg(2)); System.Console.Out.WriteLine(" #" + articleId.ToString() + " from " + provider + ": " + contents); } } System.Console.Out.WriteLine("\n(End of Feeds.)"); }