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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,eb9238bef304c5d4 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news2.google.com!news.glorb.com!news2.glorb.com!feeder.erje.net!news2.arglkargh.de!noris.net!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Using discriminant record: problem with assigning to an array in body of case Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <976bd0a5-4aff-4f40-83c7-c6b7829ab4d8@s9g2000prg.googlegroups.com> Date: Tue, 17 Mar 2009 22:15:17 +0100 Message-ID: <18so7817p9jhd$.7q44a9t9npsk$.dlg@40tude.net> NNTP-Posting-Date: 17 Mar 2009 22:15:21 CET NNTP-Posting-Host: 17423bda.newsspool3.arcor-online.net X-Trace: DXC=GIlDDRVj;hG^B]`=U:WelBMcF=Q^Z^V3H4Fo<]lROoRA^YC2XCjHcbIaQl;?6Gb3NODNcfSJ;bb[EIRnRBaCd On Tue, 17 Mar 2009 12:55:15 -0700 (PDT), ChristopherL wrote: > The below procedure compiles and links fine, but when I run it I get a > "discriminant check failed" error message. Can you please modify this > code so that the array assignment works. > > procedure test is > > type GOODS_TYPE is ( LIQUID, TEXTILE); > > type TYPE_GOODS( GOODS_TYPE_SELECTION : GOODS_TYPE) is > record > > case GOODS_TYPE_SELECTION is > when LIQUID => > ITEM_NAME : is array ( 0..5 ) of float; This is illegal. Anonymous array type may not appear as a component of a record declaration. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de