From: Georg Bauhaus <rm.dash-bauhaus@futureapps.de>
Subject: Re: Question Exception with Ada.Containers.Generic_Constrained_Array_Sort
Date: Wed, 15 Aug 2012 18:02:14 +0200
Date: 2012-08-15T18:02:00+02:00 [thread overview]
Message-ID: <502bc7f8$0$6565$9b4e6d93@newsspool3.arcor-online.net> (raw)
In-Reply-To: <8219ebbf-dc47-445f-b5eb-df6500f3e85e@googlegroups.com>
On 15.08.12 09:11, Martin wrote:
> On Tuesday, August 14, 2012 1:39:29 PM UTC+1, Marc C wrote:
>> On Monday, August 13, 2012 3:05:51 PM UTC-5, awdorrin wrote:
>>
>>
>>
>>> The comparison function is:
>>
>>>
>>
>>> function DevName_Less_Than( L,R : Device_Object_Type) return Boolean is
>>
>>> begin
>>
>>> if GetDeviceName(L) < GetDeviceName(R)
>>
>>> then
>>
>>> return TRUE;
>>
>>> else
>>
>>> return FALSE;
>>
>>> end if;
>>
>>> end DevName_Less_Than;
>>
>>
>>
>> Just a pet peeve of mine... :-)
>>
>>
>>
>> function DevName_Less_Than( L,R : Device_Object_Type) return Boolean is
>>
>> begin
>>
>> return GetDeviceName(L) < GetDeviceName(R);
>>
>> end DevName_Less_Than;
>
> +1
Rather impractical for development use! OK, I cannot normally use
a debugger, which explains the habit.
function DevName_Less_Than( L,R : Device_Object_Type) return Boolean is
Ls_Name : Device_Object_Type renames GetDeviceName(L);
Rs_Name : Device_Object_Type renames GetDeviceName(R);
Result : Boolean;
begin
if Ls_Name < Rs_Name then
pragma Debug (D (623, "got < for device names!"));
Result := TRUE;
else
Result := FALSE;
end if;
pragma Debug (D (323, "L < R is " & Boolean'Image (Result)));
return Result;
end DevName_Less_Than;
Substitute "aspect oriented programming" for pragma Debug ;->
prev parent reply other threads:[~2012-08-17 21:08 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
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 [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox