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.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FROM_STARTS_WITH_NUMS autolearn=no autolearn_force=no version=3.4.4 X-Received: by 10.107.30.16 with SMTP id e16mr2517411ioe.22.1519228696515; Wed, 21 Feb 2018 07:58:16 -0800 (PST) X-Received: by 10.157.1.9 with SMTP id 9mr184145otu.8.1519228696294; Wed, 21 Feb 2018 07:58:16 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.linkpendium.com!news.linkpendium.com!news.snarked.org!border2.nntp.dca1.giganews.com!nntp.giganews.com!w142no271760ita.0!news-out.google.com!s63ni1042itb.0!nntp.google.com!o66no269332ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 21 Feb 2018 07:58:16 -0800 (PST) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=85.240.212.129; posting-account=rhqvKAoAAABpikMmPHJSZh4400BboHwT NNTP-Posting-Host: 85.240.212.129 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <3a2e91d4-f563-4843-9c80-5a76732626d3@googlegroups.com> Subject: non record limited type From: Mehdi Saada <00120260a@gmail.com> Injection-Date: Wed, 21 Feb 2018 15:58:16 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:50518 Date: 2018-02-21T07:58:16-08:00 List-Id: I saw by trying it, that one could give a limited view, of a non-limited non-record type like type FOO is limited private; private type FOO is new INTEGER; , which I wasn't sure of just by reading the RM. That's a cool feature indeed, but why isn't it possible to write also type FOO is limited range 1..5; ? or type FOO is limited array (INTEGER range <>) limited INTEGER; I wasn't sure either from reading, but I can't compile anything similar. I don't understand why the possibility of forbidding copying isn't allowed for non record type. Also, another question: if only the public view is limited, what about the parameter passing ? Is it by reference or copy, when such copy are made in the body ? I would guess by copy, but I prefer to ask