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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,d8aa0b11d3c79b63 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: Access to strings and string subtypes? Date: 2000/03/17 Message-ID: <8atgul$i7l$1@nnrp1.deja.com>#1/1 X-Deja-AN: 598764498 References: <38d10a7b.91796987@news.rrds.co.uk> <38d11f2a.97092271@news.rrds.co.uk> <2000Mar17.070235.1@eisner> X-Http-Proxy: 1.0 x21.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Fri Mar 17 14:54:16 2000 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; I) Date: 2000-03-17T00:00:00+00:00 List-Id: In article <2000Mar17.070235.1@eisner>, Kilgallen@eisner.decus.org.nospam wrote: No one has answered the original question of WHY this annoying limitation is in Ada95. It is a (misguided in my opinion) worry about efficiency. It allows implementations to omit templates on objects with explicit bounds to save a little bit of space. I never liked this nasty restriction, because it means that x : aliased string := "hello"; x : aliased string (1 .. 5) := "hello"; are very different. And as a result you get into a Fortran like situation of having to count the length of your strings. The idea in Ada 83 was simply to allow you to omit the bounds where they are clearly unnecessary, but in Ada 95, the aliased glitch means that the omission of bounds has far more subtle effects. This is indeed a common confusion, which is why we went to the trouble of giving explicit advisory warnings here. Robert Dewar Ada Core Technologies P.S. if you can't use unauthorized software (which seems a reasonable rule, we have the same rule at ACT), then perhaps you should get an authorized copy of GNAT (we will be happy to tell you how at sales@gnat.com :-) Sent via Deja.com http://www.deja.com/ Before you buy.