From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: General circular buffer example not tied to any specific type Date: Sun, 5 Jul 2020 15:25:35 +0200 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <6ca9747e-698f-4d60-8e23-b883da5d9f38o@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sun, 5 Jul 2020 13:25:35 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="cb5f80f7dddc263cd75d3679fa47931a"; logging-data="874"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+9ZZk5DvIrgkqkqKldcqzJRLZhnidn5kk=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.8.0 Cancel-Lock: sha1:wQStSJNuJAy9v/skpbWtkhPm39c= In-Reply-To: Content-Language: en-US Xref: reader01.eternal-september.org comp.lang.ada:59346 List-Id: On 7/5/20 11:52 AM, Simon Wright wrote: > Simon Wright writes: > >> For the Size, see ARM 13.13.2(2). > > 13.13.2(1.2), sorry That only works for elementary types. For any type, a better approach is generic package Ada.Storage_IO, ARM A.9 (http://www.ada-auth.org/standards/rm12_w_tc1/html/RM-A-9.html). -- Jeff Carter "C++: The power, elegance and simplicity of a hand grenade." Ole-Hjalmar Kristensen 90