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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,74fbf0c5ce05c298 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1993-03-25 14:02:12 PST Newsgroups: comp.lang.ada Path: sparky!uunet!gatech!usenet.ins.cwru.edu!agate!linus!linus.mitre.org!linus!mbunix!eachus From: eachus@dr_no.mitre.org (Robert I. Eachus) Subject: But it is possible.... In-Reply-To: eachus@dr_no.mitre.org's message of Thu, 25 Mar 1993 21:29:15 GMT Message-ID: Sender: news@linus.mitre.org (News Service) Nntp-Posting-Host: dr-no.mitre.org Organization: The Mitre Corp., Bedford, MA. References: <1993Mar22.095301.806@enpc.fr> <1993Mar22.223336.23771@telesoft.com> <1993Mar25.012215.26844@telesoft.com> Date: Thu, 25 Mar 1993 22:02:12 GMT Date: 1993-03-25T22:02:12+00:00 List-Id: I realized just as I sent the preceding message that it is possible to modifiy Keith's code to make it portably static. Just replace Integer'LAST with Integer'POS(Integer'LAST). This makes both arguments to ">" of type universal_integer instead of STANDARD.Integer. (About six AI references omitted to avoid terminal language-lawyeritis.) Unfortunately, that makes the code even more ugly. Maybe if you write it as a single (big!) expression: Largest_Power_Of_Ten: constant := 10 ** ( Boolean'POS(Integer'POS(Integer'LAST) > 10 ** 1) + Boolean'POS(Integer'POS(Integer'LAST) > 10 ** 2) + Boolean'POS(Integer'POS(Integer'LAST) > 10 ** 3) + Boolean'POS(Integer'POS(Integer'LAST) > 10 ** 4) + Boolean'POS(Integer'POS(Integer'LAST) > 10 ** 5) + Boolean'POS(Integer'POS(Integer'LAST) > 10 ** 6) + Boolean'POS(Integer'POS(Integer'LAST) > 10 ** 7) + Boolean'POS(Integer'POS(Integer'LAST) > 10 ** 8) + Boolean'POS(Integer'POS(Integer'LAST) > 10 ** 9) + Boolean'POS(Integer'POS(Integer'LAST) > 10 ** 10) + Boolean'POS(Integer'POS(Integer'LAST) > 10 ** 11) + Boolean'POS(Integer'POS(Integer'LAST) > 10 ** 12) + Boolean'POS(Integer'POS(Integer'LAST) > 10 ** 13) + Boolean'POS(Integer'POS(Integer'LAST) > 10 ** 14) + Boolean'POS(Integer'POS(Integer'LAST) > 10 ** 15) + Boolean'POS(Integer'POS(Integer'LAST) > 10 ** 16) + Boolean'POS(Integer'POS(Integer'LAST) > 10 ** 17) + Boolean'POS(Integer'POS(Integer'LAST) > 10 ** 18) + Boolean'POS(Integer'POS(Integer'LAST) > 10 ** 19) + Boolean'POS(Integer'POS(Integer'LAST) > 10 ** 20)); At least this way it doesn't pollute the name space. But I still don't think I'll put it in the next version of ADAR. Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is... -- Robert I. Eachus with Standard_Disclaimer; use Standard_Disclaimer; function Message (Text: in Clever_Ideas) return Better_Ideas is...