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 X-Received: by 2002:a24:4913:: with SMTP id z19-v6mr3632601ita.35.1527370999154; Sat, 26 May 2018 14:43:19 -0700 (PDT) X-Received: by 2002:a9d:6183:: with SMTP id g3-v6mr489848otk.3.1527370998980; Sat, 26 May 2018 14:43:18 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!news.redatomik.org!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!85.12.16.70.MISMATCH!peer03.ams1!peer.ams1.xlned.com!news.xlned.com!peer03.am4!peer.am4.highwinds-media.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!v8-v6no3615543itc.0!news-out.google.com!f20-v6ni3245itd.0!nntp.google.com!v8-v6no3615542itc.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 26 May 2018 14:43:18 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=73.205.150.94; posting-account=Ru7E4QoAAAC_HiQ2D8LjZ7rh1mbTNcVn NNTP-Posting-Host: 73.205.150.94 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <55ce14eb-6b83-4ea0-a550-f9e1410d0b06@googlegroups.com> Subject: Strings with discriminated records From: NiGHTS Injection-Date: Sat, 26 May 2018 21:43:19 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 1819 X-Received-Body-CRC: 941418276 Xref: reader02.eternal-september.org comp.lang.ada:52706 Date: 2018-05-26T14:43:18-07:00 List-Id: I know that Ada Strings are an unconstrained type, and so you can't use the= m in records. But if a discriminated record is being passed a String parame= ter which is then being assigned to a String object in a record, the string= is being constrained at the instantiation of the record. So shouldn't the = compiler allow this configuration since it has enough information to alloca= te the memory required for the record? Either way, considering this unfortunate Ada limitation, is there a workaro= und that can assign a string's default value on a record using a discrimina= nt? Is there a way to do this with Fixed or bounded strings? Thank you for your help!