string_lower producing atoms
Peter Berry <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <CAL1by8QjK0X6_X183Q28W71XYz3mPMp8TeWtNSHoc7LrjqJGDg@mail.gmail.com> |
Since string_lower is documented in the section 5.2 of the manual which
deals with strings (in the SWI-Prolog 7 sense), and its description doesn't
mention atoms, I'd expect its output to be a string, but instead what I get
is this:
?- current_prolog_flag(double_quotes,X).
X = string.
?- string_lower("Foo", X), X = "foo".
false.
?- string_lower("Foo", X).
X = foo.
?- string_lower("Foo", "foo").
true.
Is there any particular reason for this? Isn't the point of strings to
avoid the overhead associated with atoms?
--
Peter Berry <[email protected]>
() ascii ribbon campaign - against html e-mail
/\ www.asciiribbon.org - against proprietary attachments
-------------- next part --------------
HTML attachment scrubbed and removed