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!feeder.eternal-september.org!aioe.org!.POSTED.IIfIc3CB/+nKo+wKq8+a0g.user.gioia.aioe.org!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: General circular buffer example not tied to any specific type Date: Sun, 05 Jul 2020 16:36:13 +0100 Organization: Aioe.org NNTP Server Message-ID: References: <6ca9747e-698f-4d60-8e23-b883da5d9f38o@googlegroups.com> NNTP-Posting-Host: IIfIc3CB/+nKo+wKq8+a0g.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (darwin) Cancel-Lock: sha1:mrUJKzmi9n+WM2v/ITLBjjA14/0= X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader01.eternal-september.org comp.lang.ada:59348 List-Id: "Jeffrey R. Carter" writes: > 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). As you say, this has the advantage of actually working.