[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EL Question



PureBytes Links

Trading Reference Links

At 2:23 PM -0500 2/1/99, Andrew wrote:

>If I have an array of values and I want to find the smallest value of
>all these values which is also greater than 1.0 how would I code that?
>
>In the event that no values were greater than 1.0 I would want to
>default to the last one.
>
>Any and all help is greatly appreciated.  Thanks.



I would think that something like the following should work.

Bob Fulks

-------

Final = 99999;
for Index = 0 to Max begin
   TestVal = MyArray[Index];
   Final = iff(TestVal > 1.0 and TestVal < Final, TestVal, Final);
end;

-------