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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2507b6d982782e45 X-Google-Attributes: gid103376,public From: mheaney@ni.net (Matthew Heaney) Subject: Re: [Q] Problem with Array Concatenation? Date: 1997/07/11 Message-ID: #1/1 X-Deja-AN: 256312930 References: Organization: Estormza Software Newsgroups: comp.lang.ada Date: 1997-07-11T00:00:00+00:00 List-Id: In article , stt@houdini.camb.inmet.com (Tucker Taft) wrote: >: SA : AT; >: DA : AT; >: subtype Slided is AT (1 .. 50); > >Now *this* is not legal Ada (83 or 95). You can't re-constrain >a constrained array (sub)type. Oops! Tuck is, of course, correct. I guess the compiler in my head has a few bugs, eh? If you're stuck with a constrained array type (perhaps it's a global type), then you can still do the sliding solution locally by casting the array slice into locally declared unconstrained array type: type AT is array (1 .. 100) of T; ... type Unconstrained_AT is array (Positive range <>) of T; SA, DA : AT; subtype Slid is Unconstrained_AT (1 .. 50); begin ... DA := AT (Slid (SA (51 .. 100)) & Slid (SA (1 .. 50))); Won't that work? -------------------------------------------------------------------- Matthew Heaney Software Development Consultant (818) 985-1271