Deutsch   English   Français   Italiano  
<vjaac2$14kbd$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: "Jeffrey R.Carter" <spam.jrcarter.not@spam.acm.org.not>
Newsgroups: comp.lang.ada
Subject: Re: How can I make Reduce run from right to left?
Date: Tue, 10 Dec 2024 22:04:02 +0100
Organization: A noiseless patient Spider
Lines: 19
Message-ID: <vjaac2$14kbd$1@dont-email.me>
References: <aa2e9cf6fcb092ba4e227a41b05ae707@www.novabbs.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 10 Dec 2024 22:04:32 +0100 (CET)
Injection-Info: dont-email.me; posting-host="a4660752f0400363465e8230ce48324e";
	logging-data="1200493"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX19FeEJ/aZuA8r1KfwLmUpblRU1G4ZcRKHM="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:zM8K4AhJSYv+jemKFIF9qBOOn3w=
Content-Language: en-US
In-Reply-To: <aa2e9cf6fcb092ba4e227a41b05ae707@www.novabbs.com>
Bytes: 1552

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