Hi Teamers
I am working with a procedure which involves a nested loop. The index
of the inner loop is defined as the square root of the current value of
the index of the outer loop like this:
Outer_Loop:
for Outer in This_Value .. That_Value loop
Inner_Loop:
for Inner in Lower_Limit ..
Integer(Sqrt.(Float.Outer)) loop
Blah;
Blah;
Blah;
end loop Inner_Loop;
end loop Outer_Loop;
Does Ada require evaluation of the upper limit at each iteration of the
inner loop or is the square root function (with the attendant coercions)
only called once?
Thanks in advance for the help
and I hope no-one's caught in the bushfires
Nasty things those
Cheers
---------------------------------------------------------
Rick Duley
School of Computing and Information Science
Edith Cowan University
2 Bradford St, Mt Lawley
Perth, Western Australia
tel: +61 8 9370 6619
fax: +61 8 9370 6100
mob: +61 040 910 6049 /-_|\
/ \
perth *_.-._/
Experience is the worst of teachers v
It gives you the exam
before it gives you the lecture