comp.lang.ada
 help / color / mirror / Atom feed
From: "Norman H. Cohen" <ncohen@watson.ibm.com>
Subject: Re: Group newbie !
Date: 1996/12/24
Date: 1996-12-24T00:00:00+00:00	[thread overview]
Message-ID: <32C05B7F.12A8@watson.ibm.com> (raw)
In-Reply-To: 255823034wnr@paley.demon.co.uk


Mike Paley wrote:

> I made a guess at the type string. It gave an error, so I added a bit more:
> string(20) and still got an error. Checked in a recommended book and saw
> fluff. Fortunately, there were answers to problems in the back of the book
> and a few seconds browse through them I found:
> string(1..20) - problem solved.

Somewhere in all that "fluff", there was, no doubt, an explanation of
"unconstrained array types" and "index constraints".  Had you read it,
the "fluff" would have explained that String is an unconstrained array
type, and that when you declare an object of an unconstrained array
type, you must specify either an initial value, an index constraint like
(1..20), or both.  And you would then be well on your way to
understanding not only how to declare strings, but how to write, read,
and use general-purpose array-manipulation routines, e.g. a function to
sum all the elements in an array of arbitrary length.

It really is worth investing the effort to learn the concepts underlying
the syntax.

-- 
Norman H. Cohen
mailto:ncohen@watson.ibm.com
http://www.research.ibm.com/people/n/ncohen




  reply	other threads:[~1996-12-24  0:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-12-22  0:00 Group newbie ! Mike Paley
1996-12-23  0:00 ` Larry Kilgallen
1996-12-24  0:00   ` Mike Paley
1996-12-24  0:00     ` Norman H. Cohen [this message]
1996-12-28  0:00       ` john babrick
1996-12-29  0:00         ` Mike Paley
1996-12-30  0:00           ` Norman H. Cohen
1997-01-02  0:00             ` Mike Paley
1996-12-29  0:00       ` john babrick
1996-12-24  0:00 ` Rich Maggio
1996-12-25  0:00   ` Mike Paley
1996-12-27  0:00   ` Mike Paley
1997-01-05  0:00 ` Robert Dewar
replies disabled

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