2 -- { dg-options "-gnatws -O3" }
4 with Discr21_Pkg
; use Discr21_Pkg
;
6 package body Discr21
is
8 type Index
is new Natural range 0 .. 100;
10 type Arr
is array (Index
range <> ) of Position
;
12 type Rec
(Size
: Index
:= 1) is record
18 function To_V
(pos
: Position
) return VPosition
is
20 return To_Position
(pos
.x
, pos
.y
, pos
.z
);
23 procedure Read
(Data
: Rec
) is
24 pos
: VPosition
:= To_V
(Data
.A
(1));