From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: "too few element" in an unconstrained array, given as litteral ?
Date: Sat, 20 Jan 2018 14:28:06 +0200
Date: 2018-01-20T14:28:06+02:00 [thread overview]
Message-ID: <fcgquiF271dU1@mid.individual.net> (raw)
In-Reply-To: <25736b03-e178-41ce-84fc-0e7da0e11420@googlegroups.com>
On 18-01-20 12:55 , Mehdi Saada wrote:
> The definitions for polynoms I slightly modified, don't fit anymore wit the test program:
>
> 28 Set(Poly3,(2/1, 5/8)); -- but every call on Set does the same
> ts_poly1.adb:28:14: warning: too few elements for type "T_Liste_Coef" defined
> at p_poly_v1_g.ads:48, instance at line 20
> ts_poly1.adb:28:14: warning: "Constraint_Error" will be raised at run time
...
> The current definitions:
> type T_Liste_Coef is array (T_Degre range 1..T_Degre'Last) of T_Rationnel;
...
> How can an object of an UNCONSTAINED array type, given as a litteral, have
> "too few elements ?"
T_Liste_Coef is not unconstrained; there is no "range <>" in its
declaration. It is constrained and any object of this subtype needs
T_Degre'Last elements.
--
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
. @ .
next prev parent reply other threads:[~2018-01-20 12:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-20 10:55 "too few element" in an unconstrained array, given as litteral ? Mehdi Saada
2018-01-20 12:28 ` Niklas Holsti [this message]
2018-01-20 13:21 ` Mehdi Saada
2018-01-20 16:15 ` Niklas Holsti
2018-01-20 16:52 ` Mehdi Saada
2018-01-20 21:27 ` Niklas Holsti
2018-01-20 17:48 ` Why in (array) aggregate, no more component allowed after a dynamic choice ? Mehdi Saada
2018-01-23 0:57 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox