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,a65079927bff9697,start X-Google-Attributes: gid103376,public From: "W. Wesley Groleau (Wes)" Subject: Re: 'Digit in generic package Date: 1996/08/26 Message-ID: <9608261530.AA06035@most>#1/1 X-Deja-AN: 176627805 sender: Ada programming language comments: Gated by NETNEWS@AUVM.AMERICAN.EDU mailer: Elm [revision: 70.85] newsgroups: comp.lang.ada Date: 1996-08-26T00:00:00+00:00 List-Id: R. A. O'Keefe asked [how to make a generic use the most precise type out of its actuals] R. Eachus answered [Write the generic body to dispatch at run-time] At least one vendor supplied a generic math package that did exactly that AND on examining the disassembled code for an instantiation, we found that the compiler had looked at the parameters and eliminated the "dead code" so that the effect was exactly what Mr. O'Keefe had asked for. Now I wonder whether in Ada 95 it would work to simplify R. Eachus's suggestion with ... function Generic_F ... is Precision : constant := Max(Foo'Digits,Bar'Digits,...); begin case Precision is ... -- --------------------------------------------------------------------------- W. Wesley Groleau (Wes) Office: 219-429-4923 Hughes Defense Communications (MS 10-40) Home: 219-471-7206 Fort Wayne, IN 46808 (Unix): wwgrol@pseserv3.fw.hac.com ---------------------------------------------------------------------------