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.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.unit0.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: syntaxic exploration Date: Thu, 21 Dec 2017 09:44:32 +0200 Organization: Tidorum Ltd Message-ID: References: <0d33e631-e63d-4346-ac95-5eec72127f4f@googlegroups.com> <0fa75dd5-599b-4a38-a5d4-3151bbe5172f@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net ERqGHeAaL9iyC6e7d4ZmTwqz07Glc6RubCRDAMDZj3G4H1cDsJ Cancel-Lock: sha1:nscRc5vDQX3fu+QaEwJavc8Fp2w= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: Xref: reader02.eternal-september.org comp.lang.ada:49568 Date: 2017-12-21T09:44:32+02:00 List-Id: On 17-12-21 09:24 , Randy Brukardt wrote: > "Mehdi Saada" <00120260a@gmail.com> wrote in message > news:baca5473-6224-481e-b4c0-0604153e11e7@googlegroups.com... >> Sorry. How about the empty array in an aggregate ? >> >> subtype T_Degre is Natural range 0..Max; >> type T_Vect_Coef is array (T_Degre range <>) of T_Rationnel; >> type T_Polynome (Degre : T_Degre := 0) is >> record >> Coef : T_Vect_Coef (0..Degre) := (others => Nulle); > > The above aggregate is fine for an empty array. The bounds come from the > object being initialized. But (just to avoid a possible misunderstanding on Mehdi's side) the above aggregate can never be an empty array, because Degre >= 0. An array with index range 0 .. Degre is empty only if Degre < 0. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .