home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!uknet!comlab.ox.ac.uk!oxuniv!marques
- From: marques@vax.oxford.ac.uk
- Newsgroups: comp.lang.prolog
- Subject: Re: Why can't integers become principal functors?
- Message-ID: <1993Jan21.114237.11426@vax.oxford.ac.uk>
- Date: 21 Jan 93 11:42:37 GMT
- References: <CHIK.93Jan7114812@ss38.icot.or.jp> <CHIK.93Jan14104559@ss38.icot.or.jp>
- Distribution: comp
- Organization: Oxford University Library Automation Team
- Lines: 30
-
- In article <CHIK.93Jan14104559@ss38.icot.or.jp>, chik@icot.or.jp (Takashi Chikayama) writes:
- > Thank you very much to those who responded to my question posted in
- > article <CHIK.93Jan7114812@ss38.icot.or.jp>. I'd like to thank you
- > all and summarize the responses here.
- >
- > My original question was:
- >
- >> Can somebody explain why integers cannot be the principal functor of
- >> non-atomic functors? Are there any theoretical reasons? Any
- >> implementational difficulties? Or just for compatibility with
- >> previous implementations?
- [Stuff removed]
- > Thank you again to all those who responded.
- >
- > Takashi Chikayama
- > ICOT
-
- A few years back I wrote a little prolog interpreter for my Commodore 64.
- Now it stored atom names in a hash table. Each entry in this table also
- had other pointers to the procedure corresponding to this name, the operator
- settings etc. Numbers were not stored in the hash table and this could
- explain why some implementations don't allow numbers, since under the above
- scheme there would be no way to get from the number to its procedures, or
- any other useful information that had to be common to all instances of the same
- number. Anyway my interpreter did support arbitary functor names, you
- could create something like f(f(a))(x, y) but you got an error if you tried
- to use it in call().
- --
- Jose Marques, Systems Programmer
- %INCLUDE STDDIS; /* Standard Disclaimer */
-