comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison <dennison@telepath.com>
Subject: Re: Suprise of comparison result
Date: 1999/10/18
Date: 1999-10-18T00:00:00+00:00	[thread overview]
Message-ID: <7ufaar$im7$1@nnrp1.deja.com> (raw)
In-Reply-To: 7udvrl$npq$1@nnrp1.deja.com

In article <7udvrl$npq$1@nnrp1.deja.com>,
  Robert Dewar <robert_dewar@my-deja.com> wrote:
> In article <7tke70$lf4$1@ash.prod.itd.earthlink.net>,
>   "David C. Hoos, Sr." <david.c.hoos.sr@ada95.com> wrote:
> > I believe what happens is that the literals -32768 and 32767
>                                               ^^^^^^
>
> This is not a literal, very few languages have negative
> literals (APL is an exception). Understanding this is
> important in nearly all languages.

That bit me quite badly recently in OpenToken too. Recognition of
negative literals had to be removed to support programming languages,
but that broke existing code for simpler languages. We eventually had to
add support for negative literals as an option. The header comments may
be enlightening:

  -- One would probably want to disallow signs in languages that use '-'
or
  -- '+' as an operator between integers. If your syntax does not have
such a
  -- concept, you will probably want to allow them.





--
T.E.D.


Sent via Deja.com http://www.deja.com/
Before you buy.




  reply	other threads:[~1999-10-18  0:00 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <37fd7e17.0@news.pacifier.com>
     [not found] ` <wccr9j5nat8.fsf@world.std.com>
1999-10-18  0:00   ` Suprise of comparison result Robert Dewar
     [not found] ` <7tk5d5$2qu$1@nnrp1.deja.com>
     [not found]   ` <7tke70$lf4$1@ash.prod.itd.earthlink.net>
1999-10-18  0:00     ` Robert Dewar
1999-10-18  0:00       ` Ted Dennison [this message]
1999-10-19  0:00       ` Robert A Duff
1999-10-21  0:00         ` Robert Dewar
1999-10-18  0:00 ` Robert Dewar
     [not found] ` <37FDB8D1.CC4CDB7B@gecm.com>
     [not found]   ` <37fece61.0@news.pacifier.com>
     [not found]     ` <37FFED44.6E756E81@callnetuk.com>
1999-10-11  0:00       ` Compiler Warnings (Was: Suprise of comparison result) Nick Roberts
1999-10-18  0:00     ` Suprise of comparison result Robert Dewar
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox