2 -- { dg-options "-O -gnatws" }
6 function De_Linear_Index
9 Ind_Lengths
: Dimention_Length
)
10 return Dimension_Indexes
13 Tmp_Ind
: Natural := Index
;
15 Result
: Dimension_Indexes
(1 .. D
);
18 Len
:= Len
* Ind_Lengths
(J
);
21 for J
in Result
'Range loop
22 Result
(J
) := Tmp_Res
;
23 Tmp_Ind
:= Tmp_Ind
- Len
* (Result
(J
) - 1);