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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1ca6e1940d239274 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-17 08:38:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeeds.belnet.be!news.belnet.be!news-FFM2.ecrc.net!news.iks-jena.de!lutz From: lutz@iks-jena.de (Lutz Donnerhacke) Newsgroups: comp.lang.ada Subject: Re: unconstrainted arrays Date: Wed, 17 Oct 2001 15:35:31 +0000 (UTC) Organization: IKS GmbH Jena Message-ID: References: <3BCDA15C.2976AF2@icn.siemens.de> NNTP-Posting-Host: taranis.iks-jena.de X-Trace: branwen.iks-jena.de 1003332931 28562 217.17.192.37 (17 Oct 2001 15:35:32 GMT) X-Complaints-To: usenet@iks-jena.de NNTP-Posting-Date: Wed, 17 Oct 2001 15:35:31 +0000 (UTC) User-Agent: slrn/0.9.6.3 (Linux) Xref: archiver1.google.com comp.lang.ada:14819 Date: 2001-10-17T15:35:31+00:00 List-Id: * Alfred Hilscher wrote: >type s (len : integer) is record > X,Y : Integer; > A : My_Array (1..Len); > end record; > >PTs : s (10); > >But this would add one extra component to the record (Len). Is there a >way to avoid this extra component ? Maybe a pragma or rep-specs? Its >encapsulated within a package body for HW handling where the extra >component is unwanted. type hw_s10 is record X,Y : Integer; A : My_Array (1..10); end record; for hw_s10 use record x at 0 range 0 .. 15; y at 2 range 0 .. 15; a at 4 range 0 .. 159; end record; If you are requireing a special layout, describe it directly. If the discriminant occurs in the record at an other place: No problem: type pascal_len is range 0 .. 255; type pascal_string (len : pascal_len) is record value : String (1 .. len); end record; for pascal_string use record len at 0 range 0 .. 7; end record; pragma Pack (pascal_string);