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,d23a9c52d1958b6a X-Google-Attributes: gid103376,public From: dewar@cs.nyu.edu (Robert Dewar) Subject: Re: Problem to dramatize packed-array/rep-clause difficulties Date: 1996/03/27 Message-ID: #1/1 X-Deja-AN: 144590901 references: <4jaun6$st6@news2.delphi.com> <4jce00$t75@ra.nrl.navy.mil> organization: Courant Institute of Mathematical Sciences newsgroups: comp.lang.ada Date: 1996-03-27T00:00:00+00:00 List-Id: Doug Rogers says "As Robert Dewar pointed out in a private message, I didn't specify this well enough. If I must, I will employ this kind of record on a grand (pardon the pun) scale, with "case" statements everywhere, etc. Not elegant, but it definitely stays within the realm of Ada83." Well what you are really talking about here is a repeated pattern of nine byte containing eight fields, so clearly the best approach if you have such a strange structure (it is one for which I have never seen anyting in the real world that would correspond, so it is not surprising that no one else ever asked for this), is to define an array of these nine byte values, using your case statement to select the right one of the eight fields. This is quite easy to program, and incidentally results in the most efficient possible code. I think you will find that in fact you get much MORE efficient code this way than you would from a compiler that supports this kind of jamming (p.s. all Alsys compilers have always supported this). And that is really the point here I think. You want to restrict a compiler's acceptable of rep clauses to things that are close to the machine and that it can do better than you can. Consider by analogy that typical computer languages have a built in add operator, but do not have a built-in Bessel function operator.