comp.lang.ada
 help / color / mirror / Atom feed
From: Jeff Carter <jrcarter010@earthlink.net>
Subject: Re: Diff between bounded and unbounded?
Date: 2000/01/24
Date: 2000-01-24T00:00:00+00:00	[thread overview]
Message-ID: <388C70C8.F8917EEE@earthlink.net> (raw)
In-Reply-To: 20000124154717.14341.qmail@web217.mail.yahoo.com

MaryAnn Atkinson wrote:
> 
> > 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.
> 
> Thanks for the info. One more question: What is then
> the difference between BOUNDED and UNBDOUNDED strings?

A bounded string has a fixed upper limit on the length of strings it may
contain; an unbounded string has no fixed upper limit.

It is common terminology for data structures to distinguish between
bounded and unbounded forms. The bounded form has an upper limit to its
size, and storage for that maximum size is allocated when the structure
is declared. An example would be a queue that may hold a maximum of N
elements; it would be implemented by an array of N elements.

The unbounded form has no upper limit, and storage is allocated
dynamically as needed. An unbounded queue would be implemented by
pointers and a linked list of elements, with list nodes allocated as
needed.

-- 
Jeff Carter
"Monsieur Arthur King, who has the brain of a duck, you know."
Monty Python & the Holy Grail




      parent reply	other threads:[~2000-01-24  0:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-01-24  0:00 Diff between bounded and unbounded? MaryAnn Atkinson
2000-01-24  0:00 ` Gisle S�lensminde
2000-01-24  0:00 ` Jeff Carter [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