From jan@swi.psy.uva.nl  Sat Sep 25 19:25:19 1999
Received: from gollem.swi.psy.uva.nl (jan@gollem [145.18.114.15])
	by swi.psy.uva.nl (8.9.3/8.9.3) with ESMTP id TAA06699
	for <prolog@swi.psy.uva.nl>; Sat, 25 Sep 1999 19:25:19 +0200 (MET DST)
Received: (from jan@localhost)
	by gollem.swi.psy.uva.nl (8.8.8/8.8.8) id TAA04743;
	Sat, 25 Sep 1999 19:26:10 +0200
Date: Sat, 25 Sep 1999 19:26:10 +0200
Message-Id: <199909251726.TAA04743@gollem.swi.psy.uva.nl>
From: Jan Wielemaker <jan@swi.psy.uva.nl>
Subject: Re: VARS in listing/1
To: "Miles, Douglas" <DMiles@keanesea.com>,
        "'prolog@swi.psy.uva.nl'" <prolog@swi.psy.uva.nl>
In-Reply-To: Miles, Douglas's message of Fri, 24 Sep 1999 08:33:46 -0700
Phone: +31 - 20 - 525 6121

> i have been working on a chatroom irc program for SWI prolog for many
> months.. i use the tcp extension saved in the alpha dirrectory. but before
> this i was limited to BinProlog because SWI has no native tcp/ip support...
> Hopefully soon i can contribute to such a project.. Currectly I am higher up
> the OSI model at the level of IRC chat protocol.  It was a slow climb.. and
> still is rough... 
> today i am having a problem that when i save ...
> save_myfile:-told(myfile),
> 	listing(mypred),
> 	told.
> 
> It fills in my variable names.. but sometime i have "_" in my variables...
> so when i reconsult it i get the singleton variable warnings... this is not
> too bad.. but my database is 30MB.. so i get a lot of 
> [WARNING: (/usr/local/lib/pl-3.2.8/library/allwn.pl:195955)
>         Singleton variables: A, B]
> [WARNING: (/usr/local/lib/pl-3.2.8/library/allwn.pl:195956)
>         Singleton variables: A, B]
> [WARNING: (/usr/local/lib/pl-3.2.8/library/allwn.pl:195957)
>         Singleton variables: A, B]
> [WARNING: (/usr/local/lib/pl-3.2.8/library/allwn.pl:195958)
>         Singleton variables: A, B]
> 
> this file has a normal 45 second consult time :)
> -rw-rw-r--   1 nobody   nobody   10480609 Sep 24 06:44 allwn.pl
> 
> this is what my data looks like after the listing...
> wn(ent, 201045069, A, 201073112, B).
> wn(ent, 201045661, A, 200915832, B).
> wn(ent, 201046021, A, 201301287, B).
> wn(ent, 201052666, A, 201249365, B).
> 
> its simple my question then....
> 
> how do I in a lising to make it...
> prefix my vars with _ .. like _A, _B ?

You can define rules for portray/1 (see documentation).

Maybe it is a good idea to add an option like that that write_term/2.  

Simpler is to do:

	style_check(-singletons),
	<read the file>
	style_check(+singletons).

to supress the warnings.

> also is there any plans to make a native tcp/ip bultin library?
> if so i would like to help out a bit :)

In the `packages' page of the SWI-Prolog home page is a new version
of the TCP/IP library.  There are no plans to put it into the kernel
(actually, if there are plans it is more to throw things out of the
kernel and put them into library modules to improve modularity and
reduce the footprint).

	Regards --- Jan

