From: Jean-Pierre Rosen <rosen@adalog.fr>
Subject: Re: Base64-Encoding
Date: Mon, 15 Oct 2007 17:40:27 +0200
Date: 2007-10-15T17:40:27+02:00 [thread overview]
Message-ID: <bl10ff.aok.ln@hunter.axlog.fr> (raw)
In-Reply-To: <20071015165435.0eef160d@cube.tz.axivion.com>
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
next prev parent reply other threads:[~2007-10-15 15:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-15 14:12 Base64-Encoding Stefan Bellon
2007-10-15 14:46 ` Base64-Encoding Jacob Sparre Andersen
2007-10-15 14:54 ` Base64-Encoding Stefan Bellon
2007-10-15 15:14 ` Base64-Encoding Jacob Sparre Andersen
2007-10-15 15:37 ` Base64-Encoding Robert A Duff
2007-10-15 15:40 ` Jean-Pierre Rosen [this message]
2007-10-15 16:39 ` Base64-Encoding Stefan Bellon
2007-10-16 10:42 ` Base64-Encoding Stephen Leake
2007-10-17 14:07 ` Base64-Encoding Stefan Bellon
2007-10-17 15:09 ` Base64-Encoding Adam Beneschan
2007-10-17 18:15 ` Base64-Encoding Larry Kilgallen
2007-10-15 18:24 ` Base64-Encoding Adam Beneschan
2007-10-19 2:43 ` Base64-Encoding anon
2007-10-19 4:33 ` Base64-Encoding anon
2007-10-19 7:35 ` Base64-Encoding Jean-Pierre Rosen
2007-10-19 6:59 ` Base64-Encoding Stefan Bellon
2007-10-19 19:40 ` Base64-Encoding anon
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox