From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8bdad4829476c86f,start X-Google-Attributes: gid103376,public From: James Squire Subject: Size of CHARACTER in Ada 83 Date: 1996/08/30 Message-ID: <32276B5E.51B1@mdc.com>#1/1 X-Deja-AN: 177529979 cc: ara@ocsystems.com, TEAM-ADA@acm.org content-type: text/plain; charset=us-ascii organization: McDonnell Douglas Aerospace mime-version: 1.0 newsgroups: comp.lang.ada x-mailer: Mozilla 2.02 (Win16; I) Date: 1996-08-30T00:00:00+00:00 List-Id: 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"