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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8a074a0043177938 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-11-11 20:17:41 PST Path: archiver1.google.com!news2.google.com!news.maxwell.syr.edu!wn14feed!wn13feed!worldnet.att.net!bgtnsc04-news.ops.worldnet.att.net.POSTED!not-for-mail Newsgroups: comp.lang.ada Subject: Re: Type declared in record? From: James Rogers References: Message-ID: User-Agent: Xnews/5.04.25 Date: Wed, 12 Nov 2003 04:17:41 GMT NNTP-Posting-Host: 12.86.32.60 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc04-news.ops.worldnet.att.net 1068610661 12.86.32.60 (Wed, 12 Nov 2003 04:17:41 GMT) NNTP-Posting-Date: Wed, 12 Nov 2003 04:17:41 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.ada:2394 Date: 2003-11-12T04:17:41+00:00 List-Id: Freejack wrote in news:pan.2003.11.11.20.25.14.453080.936@nospam.net: > When using Ada records, is there a way to do something like this... > > type Foo is record > type Bar is array(1..Blah) of Positive; > Foo1 : Natural; > Foo2 : Natural; > > end record; > > I know I can achieve the same(or a similiar) effect using a tagged type. > I was just curious if the above approach is possible, if there was a type > constraint that could be placed on type Bar that would garauntee a > correct elaboration at either compile time or run-time. > type Bar is array(Positive range <>) of Positive; type Foo (Blah : Positive) is record Bar1 : Bar(1..Blah); Foo1 : Natural; Foo2 : Natural; end record; Jim Rogers