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!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: grassroots thoughts on access types Date: Sat, 10 Feb 2018 16:32:41 +0100 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: <5d9134c9-a7d4-468e-8685-ebbb393eabea@googlegroups.com> <13f51bd1-00ef-4d2a-94b9-2d2560b449f3@googlegroups.com> <7781f82a-7df3-4f00-9bc8-ee60c24311f6@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 10 Feb 2018 15:32:41 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="a4188113d4920b94d27fa65f32d1ad49"; logging-data="28337"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/XlH+qTRG4TPq7ZocXwl+A5o82505K8cA=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 In-Reply-To: <7781f82a-7df3-4f00-9bc8-ee60c24311f6@googlegroups.com> Content-Language: en-US Cancel-Lock: sha1:vSpcUgEsqKRZdlXLlXp/VfcSoMk= Xref: reader02.eternal-september.org comp.lang.ada:50371 Date: 2018-02-10T16:32:41+01:00 List-Id: On 02/10/2018 12:57 PM, Mehdi Saada wrote: > while we're at it, how would I write in SPARK > type Cell is > record > Next: access Cell; > Value: Integer; > end record; You can't. SPARK doesn't have access types. You could build a bounded list instead, or put a SPARK wrapper around Ada.Containers.Doubly_Linked_Lists (if you accept that it's correct). -- Jeff Carter "What lazy lout left these wires all over the lawn?" Poppy 98