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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 Path: border2.nntp.dca1.giganews.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!peer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!post01.iad.highwinds-media.com!fx30.iad.POSTED!not-for-mail From: Shark8 User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:35.0) Gecko/20100101 Thunderbird/35.0a1 MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: array of string References: <3ffbdc6a-e767-4de1-922f-c9c1ec748f4d@googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Message-ID: X-Complaints-To: abuse@teranews.com NNTP-Posting-Date: Sat, 04 Oct 2014 02:07:18 UTC Organization: TeraNews.com Date: Fri, 03 Oct 2014 20:09:21 -0700 X-Received-Bytes: 1566 X-Received-Body-CRC: 778597106 X-Original-Bytes: 1585 Xref: number.nntp.giganews.com comp.lang.ada:189374 Date: 2014-10-03T20:09:21-07:00 List-Id: On 10/3/2014 6:19 PM, Stribor40 wrote: > ok if each string is 3 character long....say first string "abc" and "bcd".. > Example Brad show below is way too complicated for my level > Ah, here's where you /can/ use subtypes: -- Constrain String to length of 3. subtype String_3 is String(1..3); -- Create an unconstrained array of the constrained strings. Type String_List is Array(Positive range <>) of String_3; -- Type out the list out want. -- Note #1: for an array of length 1, you must use named notation. -- EG: (1 => "xyz") -- Note #2: for an array of length 0, you must use the null range. -- EG: ( 2..1 => "xxx" ) Data : constant String_List:= ("abc","bcd");