| || |
Determine largest value in array
Does anyone have a function for determining the largest value in an array of numbers? Basically I'm running a series of tests in an environment where the search result set is a moving target due to other QA activities. I need to run an initial random search test, then from that result set, determine the search values that result in the maximum returns, use those values for the next test, and then take the rest of the values to run a third test.
Re: Determine largest value in array
Well, this was really too simple to post here. Really need to adjust that caffiene IV better. [img]/images/graemlins/smile.gif[/img]
But here's what I did, if anyone has a better way, that's what this forum is for, right?
<font class="small">Code:</font><hr /><pre>
nHighest := 0;
for i := 1 to nMaxRows do
if aValueFromFile[i] > nHighest then
nHighest := aValueFromFile[i];