Subject: Confusing strings

From: "Sergio Arias Sanchez" <[email-masked]>
Date: Thu, 24 Jun 1999 11:25:44 +0200

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