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=-0.2 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM,FROM_STARTS_WITH_NUMS autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:a6b:6705:: with SMTP id b5-v6mr1770087ioc.35.1527425297804; Sun, 27 May 2018 05:48:17 -0700 (PDT) X-Received: by 2002:a9d:276e:: with SMTP id r101-v6mr650629ota.9.1527425297199; Sun, 27 May 2018 05:48:17 -0700 (PDT) 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!u74-v6no4172533itb.0!news-out.google.com!b185-v6ni3598itb.0!nntp.google.com!v8-v6no4199807itc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sun, 27 May 2018 05:48:16 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=85.241.60.216; posting-account=rhqvKAoAAABpikMmPHJSZh4400BboHwT NNTP-Posting-Host: 85.241.60.216 References: <55ce14eb-6b83-4ea0-a550-f9e1410d0b06@googlegroups.com> <704ab1a8-c954-460e-81e7-05c64fcfaba4@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <3b84f73c-c752-4258-9e75-7f53f4f3b5cf@googlegroups.com> Subject: Re: Strings with discriminated records From: Mehdi Saada <00120260a@gmail.com> Injection-Date: Sun, 27 May 2018 12:48:17 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:52724 Date: 2018-05-27T05:48:16-07:00 List-Id: > Type Message (Length : Positive; Text_Value : String) is record > Text : String(1..Length) := Text_Value; > -- Other components. > end record; The only interest in this would be being able to omit Length, and have the compiler write text: string (text_value'range) := text_value; But it's a pretty limited improvement... not worth the work. But type AA (LL : access String) is record L : String := LL.all; end record; should be allowed, I guess, for the same reason as in my other post.