From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,21f480b42128bdcd X-Google-Attributes: gid103376,public From: "Norman H. Cohen" Subject: Re: Group newbie ! Date: 1996/12/24 Message-ID: <32C05B7F.12A8@watson.ibm.com>#1/1 X-Deja-AN: 205841824 references: <441435224wnr@paley.demon.co.uk> <1996Dec22.214856.1@eisner> <255823034wnr@paley.demon.co.uk> content-type: text/plain; charset=us-ascii organization: IBM Thomas J. Watson Research Center mime-version: 1.0 reply-to: ncohen@watson.ibm.com newsgroups: comp.lang.ada x-mailer: Mozilla 3.0 (Win95; I) Date: 1996-12-24T00:00:00+00:00 List-Id: 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