comp.lang.ada
 help / color / mirror / Atom feed
From: "Steve D" <nospam_steved94@comcast.net>
Subject: Re: Comparison Operators for Strings
Date: Tue, 25 Aug 2009 18:37:06 -0700
Date: 2009-08-25T18:37:06-07:00	[thread overview]
Message-ID: <al0lm.160236$zq1.8881@newsfe22.iad> (raw)
In-Reply-To: <59ccf9ff-86ea-4179-8be3-a7f99218eeb5@q40g2000prh.googlegroups.com>

"Rick" <rickduley@gmail.com> wrote in message 
news:59ccf9ff-86ea-4179-8be3-a7f99218eeb5@q40g2000prh.googlegroups.com...
> How do the comparison operators for Strings (Fixed-length, Unbounded,
> whatever) actually work?  I am using Unbounded_String at the moment
> and in the LRM I find:
>
> 83 Each of the functions "=", "<", ">", "<=", and ">=" returns the
> same result as the corresponding String operation applied to the
> String values given or represented by Left and Right.
>
> I have checked LRM 2.6, 3.6.3, and A.4 to A.4.8 and I cannot find a
> result for a corresponding String operation.
>
> Where should I be looking?
>

LRM 4.5.2 Relational Operators an Membership tests
Paragraph (18)

The type "String" is nothing special and is defined in System:

type String is array(Positive range <>) of Character;
   pragma Pack(String);

You compare strings the same way as you can any other one dimensional array 
as described in 4.5.2(18)

Regards,
Steve

> --------------------------------------------
> Rick Duley
> North Perth,
> Western Australia
> http://rickduley.webs.com
> --------------------------------------------





  reply	other threads:[~2009-08-26  1:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-08-26  1:03 Comparison Operators for Strings Rick
2009-08-26  1:37 ` Steve D [this message]
2009-08-26  1:45   ` Adam Beneschan
2009-08-26 23:07     ` rickduley
replies disabled

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