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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,d00514eb0749375b X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!postnews.google.com!u11g2000prn.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.ada Subject: Re: initialize an array (1-D) at elaboration using an expression based on the index? Date: Wed, 10 Nov 2010 10:03:26 -0800 (PST) Organization: http://groups.google.com Message-ID: <3c3648ad-628b-4cd6-af9b-5c65e4ebfe66@u11g2000prn.googlegroups.com> References: <4b8f7f06-a817-4545-9fc6-67740c67b9d3@a4g2000prm.googlegroups.com> <4cdaad27$0$6979$9b4e6d93@newsspool4.arcor-online.net> <82e746ff-a4eb-4570-8016-78930977def1@35g2000prb.googlegroups.com> <1bhkz50152v96.1itqfwsig2md.dlg@40tude.net> NNTP-Posting-Host: 66.126.103.122 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1289412206 15708 127.0.0.1 (10 Nov 2010 18:03:26 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 10 Nov 2010 18:03:26 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: u11g2000prn.googlegroups.com; posting-host=66.126.103.122; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; WOW64; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.5.21022; .NET CLR 3.5.30729; .NET CLR 3.0.30618; .NET4.0C),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:15424 Date: 2010-11-10T10:03:26-08:00 List-Id: On Nov 10, 9:19=A0am, "Dmitry A. Kazakov" wrote: > On Wed, 10 Nov 2010 07:51:07 -0800 (PST), Adam Beneschan wrote: > > This seems like an orthogonal problem. That is, it's a problem even > > when arrays aren't involved. =A0If you have a record that contains a > > task---say you want to create a linked list: > > > =A0 =A0type Rec; > > =A0 =A0type Rec_P is access all Rec; > > =A0 =A0type Rec is record > > =A0 =A0 =A0 Job =A0: T; =A0 =A0 =A0 =A0-- T is defined with a discrimin= ant > > =A0 =A0 =A0 Link : Rec_P; > > =A0 =A0end record; > > But this is illegal if T has discriminants, they must be given for Job. T was declared with a default discriminant in Georg's example, so I think it's legal. -- Adam