comp.lang.ada
 help / color / mirror / Atom feed
From: Mehdi Saada <00120260a@gmail.com>
Subject: Why in (array) aggregate, no more component allowed after a dynamic choice ?
Date: Sat, 20 Jan 2018 09:48:29 -0800 (PST)
Date: 2018-01-20T09:48:29-08:00	[thread overview]
Message-ID: <aa4f3429-4bfd-44ac-a817-9fd0dd187841@googlegroups.com> (raw)
In-Reply-To: <25736b03-e178-41ce-84fc-0e7da0e11420@googlegroups.com>

I had to write
declare
   Temp: T_Polynome (Poly_B.Degre + Ind -1);
begin
   Temp.Coef(Poly_B.Degre + Ind -1) :=              
   Poly_A.Coef(Poly_B.Degre+Ind)/Poly_B.Coef(Poly_B.Degre);
end;

Ind being a loop indice.

whereas I would have prefered:
Temp: T_polynome :=  (Poly_B.Degre + Ind - 1,(Poly_B.Degre + Ind - 1 => Poly_A.Coef (Poly_B.Degre+Ind)/Poly_B.Coef(Poly_B.Degre), others => <>));

What's the reason behind this limitation, whereas in one more sentence, the same effect is achieved ?


  parent reply	other threads:[~2018-01-20 17:48 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
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 ` Mehdi Saada [this message]
2018-01-23  0:57   ` Why in (array) aggregate, no more component allowed after a dynamic choice ? 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