From: "(see below)" <yaldnif.w@blueyonder.co.uk>
Subject: Re: Using discriminant record: problem with assigning to an array in body of case
Date: Tue, 17 Mar 2009 20:05:34 +0000
Date: 2009-03-17T20:05:34+00:00 [thread overview]
Message-ID: <C5E5B30E.10F675%yaldnif.w@blueyonder.co.uk> (raw)
In-Reply-To: 976bd0a5-4aff-4f40-83c7-c6b7829ab4d8@s9g2000prg.googlegroups.com
On 17/03/2009 19:55, in article
976bd0a5-4aff-4f40-83c7-c6b7829ab4d8@s9g2000prg.googlegroups.com,
"ChristopherL" <clusardi2k@aol.com> wrote:
> The below procedure compiles and links fine,
No, it doesn't. What else have you changed?
> 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;
>
> when TEXTILE =>
> LENGTH : float;
> WIDTH : float;
> end case;
> end record;
>
> A : TYPE_GOODS( LIQUID );
>
> begin
>
> A := ( GOODS_TYPE_SELECTION => LIQUID,
> ITEM_NAME => (1.0, 1.1, 1.2, 1.3, 1.4,1.5) );
>
> end test;
--
Bill Findlay
<surname><forename> chez blueyonder.co.uk
next parent reply other threads:[~2009-03-17 20:05 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 ` (see below) [this message]
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
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox