From SARIAS@sag.es  Thu Jun 24 11:28:37 1999
Received: from fwall.sag.es ([212.49.179.3])
	by swi.swi.psy.uva.nl (8.9.3/8.9.3) with SMTP id LAA03779
	for <prolog@swi.psy.uva.nl>; Thu, 24 Jun 1999 11:28:36 +0200 (MET DST)
Received: by fwall.sag.es; (5.65v3.2/1.3/10May95) id AA32121; Thu, 24 Jun 1999 11:37:08 +0200
Received: from SAG-Message_Server by sag.es
	with Novell_GroupWise; Thu, 24 Jun 1999 11:27:56 +0200
Message-Id: <s772163c.077@sag.es>
X-Mailer: Novell GroupWise 5.2
Date: Thu, 24 Jun 1999 11:25:44 +0200
From: "Sergio Arias Sanchez" <SARIAS@sag.es>
To: prolog@swi.psy.uva.nl
Subject: Confusing strings
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by swi.swi.psy.uva.nl id LAA03779


  Hi.

  I've been using strings in my programs and I found some difficulties using the 
related predicates.
  First it seems that is not the same a STRING "hello" than the LIST "hello". Both 
look the same, but...

  ?- string("hello")
      No

  ?- string_to_list(Str,"hello"), string(Str).
      Str = "hello"
      Yes

So far, so good... But:

  ?- string_to_atom("hello", A).
      A = hello
      Yes

 So now "hello" is not a list but a string !!?

  It would be ok if we could treat strings as either lists of ascii values or as types, 
but following the same criteria.

  Cheers.

                      sergio

