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,fea712d150785611 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-02-08 07:51:38 PST Path: nntp.gmd.de!newsserver.jvnc.net!nntpserver.pppl.gov!princeton!gw1.att.com!fnnews.fnal.gov!uwm.edu!news.alpha.net!solaris.cc.vt.edu!swiss.ans.net!butch!cliffy.lfwc.lockheed.com!cliffy.lfwc.lockheed.com!l107353 From: l107353@cliffy.lfwc.lockheed.com (Garlington KE) Newsgroups: comp.lang.ada Subject: Re: Re : Run time sizing of arrays - HELP Date: 8 Feb 1995 15:51:38 GMT Organization: Lockheed Fort Worth Company Message-ID: <3hapaa$lva@cliffy.lfwc.lockheed.com> References: NNTP-Posting-Host: 134.189.143.19 X-Newsreader: TIN [version 1.2 PL2] Date: 1995-02-08T15:51:38+00:00 List-Id: Marcel Hawtin (hawtinml@aston.ac.uk) wrote: : I'm new to Ada, and was wondering if it is possible for the size of arrays to be : determined at run time. : For example, many years ago it was possible to say in BASIC something like : : 10 INPUT A : 20 INPUT B : 20 DIM(A,B) The equivalent in Ada would go something like: A, B : Positive; .. Pos_IO.Get(A); Pos_IO.Get(B); declare type Some_Dynamic_Array_Type is array (1 .. A, 1 .. B) of Some_Object; C : Some_Dynamic_Array_Type; begin .. Notice I said "Something" like, since (1) I don't have an Ada compiler on this machine and (2) there's several other ways (all better, I'm sure) for creating C and (3) it's been a long time since I wrote any BASIC. -------------------------------------------------------------------- Ken Garlington GarlingtonKE@lfwc.lockheed.com F-22 Computer Resources Lockheed Fort Worth Co. If LFWC or the F-22 program has any opinions, they aren't telling me.