comp.lang.ada
 help / color / mirror / Atom feed
From: James Squire <jsquire@mdc.com>
Cc: ara@ocsystems.com, TEAM-ADA@acm.org
Subject: Size of CHARACTER in Ada 83
Date: 1996/08/30
Date: 1996-08-30T00:00:00+00:00	[thread overview]
Message-ID: <32276B5E.51B1@mdc.com> (raw)


I'm momentarily at my wits end and was just wondering if anyone can help.

We just upgraded an Ada 83 compiler to a new version, and old code such 
as this:

   Mumble : constant array(CHARACTER'FIRST .. CHARACTER'LAST) := <128 
value aggregate>;

no longer compiles as it once did.  The compiler we are using (which I 
don't want to specify - it's not the issue anyway) now complains that the 
sizes of the arrays are different and this code will raise a 
CONSTRAINT_ERROR.

I was sure this was a bug (it was reported as such) since the only other 
conclusion was that the size of CHARACTER had changed, and I thought, 
"how can that be?"

I have since been informed that somewhere in the Annotated Ada (83) 
Reference Manual, there is an AI (Ada Interpretation) which allows 
CHARACTER to have 256 values.  This new compiler version made the change, 
anticipating Ada 95.  My problem is that the above code is generated by 
ALEX.

Is the AARM for Ada 83 out on the Web anywhere?  I don't think we have 
one.  I would like to satisfy myself that this is appropriate (it's 
certainly not allowed by the LRM, at least by my reading).  If not, can 
anyone enlighten me as to what the vendor is required to do if they 
choose to make this change?

It seems to me that those who want a 256 value CHARACTER should have to 
change their code rather than me change mine, but I have this funny 
feeling the case is "moot" (with apologies to Robert Dewar or whoever 
that was that was complaining about improper usage of that word).  Is it?

If so, my only options seem to be to try to change my .L file or exercise 
some option in processing it, so that more portable code is generated (I 
have my doubts about this one) or else live with manually changing the 
code each time I regenerate it.  Actually the third option is to not use 
the new compiler version but stick with the previous version which 
compiled it "correctly".

Is this truly what I am left with?  Are there versions of ALEX that would 
generate "proper code" for me?
-- 
James Squire                             mailto:jsquire@mdc.com
MDA Avionics Tools & Processes
McDonnell Douglas Aerospace              http://www.mdc.com/
Opinions expressed here are my own and NOT my company's
"Beep. Beep."
	-- Garibaldi (to G'Kar), "The Gathering"




             reply	other threads:[~1996-08-30  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-08-30  0:00 James Squire [this message]
1996-08-31  0:00 ` Size of CHARACTER in Ada 83 Robert Dewar
1996-09-01  0:00   ` James Squire
1996-09-01  0:00   ` John Herro
replies disabled

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