Re: How to work with dots? When are they read as `./3` when as parts of an atom?

Jan Wielemaker <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
On 02/16/2014 06:20 AM, Shon Feder wrote:
> To clarify and correct my question: I'm mainly curious what the decisive
> factors are for whether the unquoted *a.b* gets read as an atom and when
> it's an operator expecting the *a *to be a dict.

I first foolishly thought it was possible to deal with that distinction
in a meaingful way, but it isn't, so, X.Y is read as .(X,Y), regardless
of the types of X and Y (well, except for floats).  The fact this worked
for floats also tricked me it could work for atoms :-(

	Cheers --- Jan

P.s.	Docs are updated, but the download page still claims a.b is
	and atom.  Will fix that.

>
> Also, I should note that I made the mistake of adding backquotes around *a.b
> *to the quote from the SWI download page. It should have read
>
>> Unquoted atoms may contain internal dots. E.g., a.b is an atom.
>
> Thanks again!
>
>
> On Sat, Feb 15, 2014 at 3:12 PM, Shon Feder <[email protected]> wrote:
>
>> Hi, all,
>>
>> I skimmed through the recent mailing list subjects and didn't see this
>> addressed elsewhere. But I am sorry if I overlooked an existing discussion!
>>
>> I just fired up the newest development version, and am running *SWI-Prolog
>> (Multi-threaded, 64 bits, Version 7.1.8)* on OS X 9.1.
>>
>> According to the note on the page for the latest development release,
>>
>>> Unquoted atoms may contain internal dots. E.g., `a.b` is an atom.
>>
>> But the dot seems to treated exclusively as the operator for functions on
>> dicts:
>>
>>      ?- atom(a.b).
>>      ERROR: Type error: `dict' expected, found `a' (an atom)
>>
>> Same thing if I try and use it as a functor:
>>
>>      ?- compound(a.b(X)).
>>      ERROR: Type error: `dict' expected, found `a' (an atom)
>>
>> Can anyone help clarify for my sake?
>>
>> Many thanks!
>>
>> Shon
>>
>> *P.S. I'm seeing some buggy interface elements on the new (much prettier!)
>> SWI site. Is this a known issue, or would it be helpful for me detail what
>> I'm seeing?*
>>
> -------------- next part --------------
> HTML attachment scrubbed and removed
> _______________________________________________
> SWI-Prolog mailing list
> [email protected]
> https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.