TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Classic View

Use Monospaced Font
Show HTML Part by Default
Show All Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Vincent Celier <[log in to unmask]>
Wed, 19 Jun 2002 19:39:15 -0700
text/plain (23 lines)
>   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?

The truth is in the RM. In this case, it is in RM 5.5 (9).
With an explicit note in RM 5.5 (12).

--  Vincent