comp.lang.ada
 help / color / mirror / Atom feed
From: adambeneschan@gmail.com
Subject: Re: character literals
Date: Tue, 11 Feb 2014 17:50:28 -0800 (PST)
Date: 2014-02-11T17:50:28-08:00	[thread overview]
Message-ID: <8a171ff1-5785-4b92-b072-fa883c648fa3@googlegroups.com> (raw)
In-Reply-To: <ldeire$4kr$1@dont-email.me>

On Tuesday, February 11, 2014 5:30:22 PM UTC-8, Jeffrey Carter wrote:
> On 02/11/2014 04:56 PM, Adam Beneschan wrote:
> 
> >
> 
> > The first "loop" statement, which is ambiguous, was legal in Ada 83, when
> > there was only one character type; when Wide_Character was added to Ada 95
> > [Wide_Wide_Character wasn't added until Ada 2005], this became illegal, which
> > caused some compatibility headaches for existing code.
> 
> Nonsense. Ada 83 had user-defined character types. ARM-83 3.5.2 ("Character 
> Types") includes the declaration of character type Roman_Digit.

But '0' and '9' aren't ROMAN_DIGITs, so those wouldn't have made the loop illegal, right?  

OK, technically, you're right, that the loop *might* *not* be legal if there were a visible user-defined enumeration type that included '0' and '9'.  In practice, that would have been extremely uncommon, I think.  (I don't believe I've *ever* seen a user-defined character type in production code.)  We had a lot of Ada 83 code with legal loops like this, and they became illegal with Ada 95, so that part isn't nonsense.
   
                              -- Adam

  reply	other threads:[~2014-02-12  1:50 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-11 22:27 character literals agent
2014-02-11 22:49 ` J-P. Rosen
2014-02-11 23:45   ` Bill Findlay
2014-02-11 23:49     ` Ludovic Brenta
2014-02-11 23:58       ` adambeneschan
2014-02-11 23:56 ` adambeneschan
2014-02-12  0:18   ` adambeneschan
2014-02-12  1:34     ` agent
2014-02-12  2:03       ` adambeneschan
2014-02-12 12:50         ` agent
2014-02-12  1:30   ` Jeffrey Carter
2014-02-12  1:50     ` adambeneschan [this message]
2014-02-12 15:53   ` Robert A Duff
2014-02-12 17:55     ` J-P. Rosen
2014-02-14 12:39       ` agent
2014-02-14 18:36         ` AdaControl was: " Simon Clubley
2014-02-15  6:26         ` J-P. Rosen
replies disabled

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