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=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,1cb75f0476fe2d1a X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!npeer.de.kpn-eurorings.net!newsfeed.arcor.de!news.arcor.de!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Half Constrained Array Types and Slices From: Georg Bauhaus In-Reply-To: <1q3lxr5byac4f$.x8dnc8mjzyj2.dlg@40tude.net> References: <1q3lxr5byac4f$.x8dnc8mjzyj2.dlg@40tude.net> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: # Message-ID: <1141313690.19791.1.camel@sonnenregen> Mime-Version: 1.0 X-Mailer: Evolution 2.4.1 Date: Thu, 02 Mar 2006 16:34:50 +0100 NNTP-Posting-Date: 02 Mar 2006 16:29:08 MET NNTP-Posting-Host: 36743de7.newsread2.arcor-online.net X-Trace: DXC=>P:lOLlJb@:j12nnM8XB1>Q5U85hF6f;4jW\KbG]kaM8U7^]5?JhlB>[O7_;`aZn41hP3YJKgE\j On Thu, 2006-03-02 at 09:34 +0100, Dmitry A. Kazakov wrote: > On Thu, 02 Mar 2006 05:00:06 GMT, Jeffrey R. Carter wrote: > > type String (Length : Natural) is array (1 .. Length) of Character; > > Not only this. Discriminants for arrays would also allow nice things like: > > type Table (Element_Size : Natural) is > array (...) of String (1..Element_Size); If you didn't dislike generics that much, generic Element_Size: NATURAL; package String_Tables is subtype SIZED_STRING is STRING(1.. Element_Size); type TABLE is array(POSITIVE range <>) of SIZED_STRING; end String_Tables;