comp.lang.ada
 help / color / mirror / Atom feed
From: Ted Dennison<dennison@telepath.com>
Subject: Re: Constraint error?
Date: Tue, 05 Jun 2001 15:22:11 GMT
Date: 2001-06-05T15:22:11+00:00	[thread overview]
Message-ID: <DO6T6.682$SQ2.28305@www.newsranger.com> (raw)
In-Reply-To: 3B1CC1FE.304BF00E@earthlink.net

In article <3B1CC1FE.304BF00E@earthlink.net>, Marc A. Criley says...
>
>Ted Dennison wrote:
>> strings as function return values. Of course this method only works if you >> don't plan on changing the contents. For example (my apologies if my 

>Ada 95 removed the requirement that a String declaration as used in the
>above example be declared _constant_.  The string will be properly
>sized, but you can now modify it to your heart's content, just can't
>change the size.

True. But its quite rare that you might need to change the contents but never
the size. Thus this relaxation is mostly useful for those slightly less rare
instances where you need it to not be constant for technical reasons. (eg: You
need to create an access to it using a non-constant access type. You need to use
it in an "access" parameter. You need to pass it into a routine that doesn't
modify it, but uses "in out" for the parameter anyway.)

I'll admit its a possibility, but not a common enough one to worry a beginner
with.

---
T.E.D.    homepage   - http://www.telepath.com/dennison/Ted/TED.html
          home email - mailto:dennison@telepath.com



      reply	other threads:[~2001-06-05 15:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-03 22:30 Constraint error? McDoobie
2001-06-03 23:13 ` David C. Hoos, Sr.
2001-06-03 23:26   ` McDoobie
2001-06-04 15:42     ` Ted Dennison
2001-06-04 16:12       ` Marin David Condic
2001-06-04 20:52         ` Robert A Duff
2001-06-04 20:50       ` Robert A Duff
2001-06-04 21:13         ` Ted Dennison
2001-06-04 21:44           ` Ehud Lamm
2001-06-05 12:21       ` Marc A. Criley
2001-06-05 15:22         ` Ted Dennison [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