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

maxlist in a for loop



PureBytes Links

Trading Reference Links

For something like the following:

for value1=0 to 10 begin    {FYI, value1 is not related to bar numbers}
value2=value0*value1;
end;

What would be the most efficient (or shortest) code to compute the max (or
highest) value of value2 in the above for loop without having to write
something lengthy like:

if value1=0 then value3=value2;
if value1=1 then value4=value2;
{and so on.... and then finally}
value14=maxlist(value3, value4,......value13);