comp.lang.ada
 help / color / mirror / Atom feed
* FIXED vs BOUNDED strings in Ada 95
@ 2000-01-19  0:00 MaryAnn Atkinson
  2000-01-19  0:00 ` Robert C. Leif, Ph.D.
  2000-01-21  0:00 ` Ted Dennison
  0 siblings, 2 replies; 3+ messages in thread
From: MaryAnn Atkinson @ 2000-01-19  0:00 UTC (permalink / raw)
  To: comp.lang.ada

Could someone please provide a paragraph or two
explaining the difference between 
fixed and bounded strings?

... so far it seems like Ada's use of 
strings(all of them), is quite awkward.

Oracle's PL/SQl which is structured after Ada, 
provided a much easier and way more functional way.

MAA
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com







^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: FIXED vs BOUNDED strings in Ada 95
  2000-01-19  0:00 FIXED vs BOUNDED strings in Ada 95 MaryAnn Atkinson
@ 2000-01-19  0:00 ` Robert C. Leif, Ph.D.
  2000-01-21  0:00 ` Ted Dennison
  1 sibling, 0 replies; 3+ messages in thread
From: Robert C. Leif, Ph.D. @ 2000-01-19  0:00 UTC (permalink / raw)
  To: comp.lang.ada

From: Robert C. Leif, Ph.D.
To: MaryAnn Atkinson et al.

Fixed strings contain a constant number of characters; the length of the
string. Bounded strings contain a maximum number of characters. The actual
number of characters is also available as a function. Thus a
Line_Bounded_String could contain from 0 to 80 characters. Bounded strings
are a very efficient and useful construct.

-----Original Message-----
From: MaryAnn Atkinson [mailto:maryann_30@yahoo.com]
Sent: Wednesday, January 19, 2000 8:20 AM
To: comp.lang.ada@ada.eu.org
Subject: FIXED vs BOUNDED strings in Ada 95


Could someone please provide a paragraph or two
explaining the difference between
fixed and bounded strings?

... so far it seems like Ada's use of
strings(all of them), is quite awkward.

Oracle's PL/SQl which is structured after Ada,
provided a much easier and way more functional way.

MAA
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com











^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: FIXED vs BOUNDED strings in Ada 95
  2000-01-19  0:00 FIXED vs BOUNDED strings in Ada 95 MaryAnn Atkinson
  2000-01-19  0:00 ` Robert C. Leif, Ph.D.
@ 2000-01-21  0:00 ` Ted Dennison
  1 sibling, 0 replies; 3+ messages in thread
From: Ted Dennison @ 2000-01-21  0:00 UTC (permalink / raw)


In article <20000119161944.5261.qmail@web207.mail.yahoo.com>,
  comp.lang.ada@ada.eu.org wrote:
> Could someone please provide a paragraph or two
> explaining the difference between
> fixed and bounded strings?

Bascily bounded strings prevent you from having to keep an extra
variable around to keep track of the current number of valid characters
in the string.

But 9 times out of 10 you can initialize a (fixed) String object with
the contents it needs to have and not have to bother with modifying it.
Its rare that an Ada programmer really needs to modify a string object.
When you do, its usually more convienent to use Unbounded strings.
Unfortunately, Text_IO.Get_Line is an exception.

> ... so far it seems like Ada's use of
> strings(all of them), is quite awkward.

The Ada way is actually a great way to deal with strings, once you get
used to it. The trick is to do everything you can with constants
(which in Ada can be declared in any scope you choose). To bone up, I
suggest looking through some of the examples in the Ada Source Code
Treasury at http://www.adapower.com/source.html

> Oracle's PL/SQl which is structured after Ada,
> provided a much easier and way more functional way.

I haven't used PL/SQl. Only C, Pascal, Fortran, Lisp, Basic, various
assemblers, TCL, Modula-2, Java, Ada, AHPL, Rexx, Ratfor, Concurrent-C,
and Oberon. So for all I know I'm missing out on some great paridigm
that will make Ada strings look pathetic by comparison. But I haven't
seen it yet.

--
T.E.D.

http://www.telepath.com/~dennison/Ted/TED.html


Sent via Deja.com http://www.deja.com/
Before you buy.




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2000-01-21  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-01-19  0:00 FIXED vs BOUNDED strings in Ada 95 MaryAnn Atkinson
2000-01-19  0:00 ` Robert C. Leif, Ph.D.
2000-01-21  0:00 ` Ted Dennison

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