From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: Using discriminant record: problem with assigning to an array in body of case
Date: Tue, 17 Mar 2009 22:15:17 +0100
Date: 2009-03-17T22:15:21+01:00 [thread overview]
Message-ID: <18so7817p9jhd$.7q44a9t9npsk$.dlg@40tude.net> (raw)
In-Reply-To: 976bd0a5-4aff-4f40-83c7-c6b7829ab4d8@s9g2000prg.googlegroups.com
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
prev parent reply other threads:[~2009-03-17 21:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <976bd0a5-4aff-4f40-83c7-c6b7829ab4d8@s9g2000prg.googlegroups.com>
2009-03-17 20:05 ` Using discriminant record: problem with assigning to an array in body of case (see below)
2009-03-17 20:24 ` Using discriminant record: problem with assigning to an array in body anon
2009-03-17 20:50 ` Using discriminant record: problem with assigning to an array in body of case Jeffrey R. Carter
2009-03-17 21:15 ` Dmitry A. Kazakov [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox