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 X-Received: by 2002:a6b:3946:: with SMTP id g67-v6mr6040211ioa.20.1538689097434; Thu, 04 Oct 2018 14:38:17 -0700 (PDT) X-Received: by 2002:aca:3094:: with SMTP id w142-v6mr168337oiw.0.1538689097285; Thu, 04 Oct 2018 14:38:17 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.166.216.MISMATCH!x98-v6no16505ita.0!news-out.google.com!l70-v6ni118itb.0!nntp.google.com!x98-v6no16504ita.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 4 Oct 2018 14:38:17 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=76.18.64.97; posting-account=lJ3JNwoAAAAQfH3VV9vttJLkThaxtTfC NNTP-Posting-Host: 76.18.64.97 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <3f2828df-d54a-4427-bc3c-dc5ef0dc8069@googlegroups.com> Subject: A little trouble with very large arrays. From: Shark8 Injection-Date: Thu, 04 Oct 2018 21:38:17 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:54479 Date: 2018-10-04T14:38:17-07:00 List-Id: I'm trying to implement a FITS library for work -- see https://fits.gsfc.na= sa.gov/standard40/fits_standard40aa.pdf -- and have come across some rather= interesting problems implementing it. The main-problem right now is the "Primary Data Array" which can have a dim= ensionality in 1..999, each itself with some non-zero range. (In the files = these are specified by keywords in the file like NAXIS =3D n, NAXIS1 =3D n_= 1, NAXIS2 =3D n_2, and so on until the NAXISn =3D n_n keyword/value pair is= encountered.) Relatively straightforward, no? Well, I'd thought I could handle everything= with a dimensionality-array and generic like: Type Axis_Count is range 0..999 with Size =3D> 10; Type Axis_Dimensions is Array (Axis_Count range <>) of Positive with Default_Component_Value =3D> 1; ... Generic Type Element is (<>); Dim : Axis_Dimensions:=3D (1..999 =3D> 1); Package FITS.Data with Pure is Type Data_Array is not null access Array( 1..Dim( 1),1..Dim( 2),1..Dim( 3),1..Dim( 4), 1..Dim( 5),1..Dim( 6),1..Dim( 7),1..Dim( 8), --... 1..Dim( 997),1..Dim( 998),1..Dim( 999) ) of Element with Convention =3D> Fortran; End FITS.Data; But no dice. GNAT won't even compile an array like this [999 indexes]. What's the proper way to go about doing this? (As another interesting constraint, the file-format mandates a sort of bloc= k-structure of 2880 bytes [23040 bits], and while I don't anticipate this b= eing an issue, something that might be relevant.)