Re: How can I make Reduce run from right to left?

Liste des GroupesRevenir à cl ada 
Sujet : Re: How can I make Reduce run from right to left?
De : spam.jrcarter.not (at) *nospam* spam.acm.org.not (Jeffrey R.Carter)
Groupes : comp.lang.ada
Date : 10. Dec 2024, 22:04:02
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vjaac2$14kbd$1@dont-email.me>
References : 1
User-Agent : Mozilla Thunderbird
On 2024-12-10 18:20, Brian9000 wrote:
  Ada.Text_IO.Put_Line (Real'Image ([ for i in reverse 0 .. data'Last -
1 => data(i) ]'Reduce("-", data(data'Last))));
Presumably you could do
[for I in 0 .. Data'Last - 1 => Data (Data'Last - 1 - I)]'Reduce
Or write a Reverse function
Reverse (Data (0 .. Data'Last - 1) )'Reduce
--
Jeff Carter
"An essential part of teaching Ada is not
the technical details, but the message of
software engineering."
Jean-Pierre Rosen
167

Date Sujet#  Auteur
10 Dec 24 * How can I make Reduce run from right to left?6Brian9000
10 Dec 24 +- Re: How can I make Reduce run from right to left?1J-P. Rosen
10 Dec 24 +- Re: How can I make Reduce run from right to left?1J-P. Rosen
10 Dec 24 +- Re: How can I make Reduce run from right to left?1Jeffrey R.Carter
11 Dec 24 +- Re: How can I make Reduce run from right to left?1Brian9000
11 Dec 24 `- Re: How can I make Reduce run from right to left?1Brian9000

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal