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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e710f7d3f890e76b X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!oleane.net!oleane!hunter.axlog.fr!nobody From: Jean-Pierre Rosen Newsgroups: comp.lang.ada Subject: Re: Base64-Encoding Date: Mon, 15 Oct 2007 17:40:27 +0200 Organization: Adalog Message-ID: References: <20071015161229.3f439230@cube.tz.axivion.com> <20071015165435.0eef160d@cube.tz.axivion.com> NNTP-Posting-Host: mailhost.axlog.fr Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: s1.news.oleane.net 1192464087 7712 195.25.228.57 (15 Oct 2007 16:01:27 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Mon, 15 Oct 2007 16:01:27 +0000 (UTC) User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) In-Reply-To: <20071015165435.0eef160d@cube.tz.axivion.com> Xref: g2news2.google.com comp.lang.ada:2455 Date: 2007-10-15T17:40:27+02:00 List-Id: Stefan Bellon a �crit : > On Mon, 15 Oct, Jacob Sparre Andersen wrote: > >> Stefan Bellon wrote: >> >>> Padded_Data : String (1 .. Padded_Length) := (others => >>> ASCII.NUL); -- Padded input data. >> [...] >>> begin >>> Padded_Data (1 .. Data'Length) := Data; >>> -- Initialize data into padded-data (can't be done with >>> aggregate -- in elaboration part, sadly). >> Why? I may have missed something obvious, but I would have thought >> that >> >> Padded_Data : String (1 .. Padded_Length) := Data & (others => >> ASCII.NUL); >> >> would work fine. > > This results in: > > error: "others" choice not allowed here How many elements are covered byt "others" cannot be determined in this context, but this should work: Padded_Data : String (1 .. Padded_Length) := Data & (Data'Length+1 .. Padded_Length => ASCII.NUL); > I hoped for this as well, but it looks like the attribute Bit_Order is > only defined for record types. This is what 13.5.3 says and indeed GNAT > refuses to accept a 'Bit_Order on Six_Bits or the array thereof. Bit_Order is about bit numbering, it has nothing to do with endianness -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr