On Jan 29, 11:26 pm, Ricardo Aguirre <
el.mas...@gmail.com> wrote:
> I have a doubt,
> I'm not really skilled using ada, and now I have some problems.
> This is my code <
http://pastebin.com/6h2WTJFZ>:
>
> And this is what I get <
http://pastebin.com/mkZ42mSr>:
Just as the compiler says:
frame_publisher.adb:92:43: warning: value not in range of subtype of
"My_Index_Type" defined at line 52
frame_publisher.adb:92:43: warning: "Constraint_Error" will be raised
at run time
What you have in line 92 is:
Ada.Text_IO.Put_Line ("Ball_PositionX " &
My_Int_Type'Image (Position2(0)));
and the type definitions are:
type My_Int_Type is new Integer;
type My_Index_Type is new Positive;
type My_Int_Array is array (My_Index_Type range <>)
of My_Int_Type;
This means that indices in your array are positive numbers and you use
0. Try 1 instead if you mean the first array element.
Please note that this is not the YAMI4 problem and it does not really
belong to this discussion group.