comp.lang.ada
 help / color / mirror / Atom feed
From: awdorrin <awdorrin@gmail.com>
Subject: Re: Question Exception with Ada.Containers.Generic_Constrained_Array_Sort
Date: Mon, 13 Aug 2012 13:44:19 -0700 (PDT)
Date: 2012-08-13T13:44:19-07:00	[thread overview]
Message-ID: <097437ed-1197-423f-8c00-4480fb2f8ebb@googlegroups.com> (raw)
In-Reply-To: <dc3eb5cb-8919-4dff-92fd-25f6983c043b@googlegroups.com>

I managed to find a way to get this to work, but I am really not sure I'm doing this the right way. :)

First, I changed from using Generic_Constrained_Array_Sort to the unconstrained version.

Second, I changed my declarations like this:

type Device_Array_Type is array( Device_Index_Type range <> ) of Device_Object_Type; // make this unconstrained

type DeviceListType is record
  Num_Devices : Device_Index_Type;
  DeviceList  : Device_Array_Type(Device_Index_Type); // limit range 1..128
end record;

Code appears to do what I want it to, but I'm really not sure this is the right solution.




  reply	other threads:[~2012-08-13 20:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-13 20:05 Question Exception with Ada.Containers.Generic_Constrained_Array_Sort awdorrin
2012-08-13 20:44 ` awdorrin [this message]
2012-08-13 21:25   ` Adam Beneschan
2012-08-14 12:22     ` awdorrin
2012-08-14 12:39 ` Marc C
2012-08-15  7:11   ` Martin
2012-08-15 16:02     ` Georg Bauhaus
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox