From: Christoph Grein <christoph.grein@eurocopter.com>
Subject: Re: boolean array
Date: Fri, 25 Jan 2002 06:55:03 +0100 (MET)
Date: 2002-01-25T06:55:03+01:00 [thread overview]
Message-ID: <mailman.1011938222.12962.comp.lang.ada@ada.eu.org> (raw)
Foo : array (some_range) of Boolean;
...
Any_False_Present : constant Boolean := Foo /= (some_range => True);
But faster/preferred ??
> Hello,
>
> I want to know if there is any false element(s) in an array of booleans.
>
> Currently I am looping through the array and looking at each value until
> I find a false element.
>
> x := true;
> for i in foo'range loop -- foo'range < 8
> x := foo (i);
> exit when not x;
> end loop;
>
> if x then .....
>
> Is there a faster/preferred way of accomplishing this?
> I am compiling Ada 95 with Green Hills AdaMULTI for VxWorks running on x86.
>
> Thank you,
> Keith
next reply other threads:[~2002-01-25 5:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-25 5:55 Christoph Grein [this message]
2002-01-25 20:37 ` boolean array Robert Dewar
-- strict thread matches above, loose matches on Subject: below --
2002-01-25 0:33 Keith
2002-01-25 13:51 ` Sandro Binetti
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox