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,92882847c09de3aa X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-01-03 10:02:25 PST Newsgroups: comp.lang.ada Path: nntp.gmd.de!newsserver.jvnc.net!howland.reston.ans.net!gatech!news-feed-1.peachnet.edu!paperboy.wellfleet.com!noc.near.net!inmet!spock!stt From: stt@spock.camb.inmet.com (Tucker Taft) Subject: Re: Language Lawyers help on rep_specs Message-ID: Sender: news@inmet.camb.inmet.com Organization: Intermetrics, Inc. References: <393@hathor.CSS.GOV> <3ebo8f$jlo@theopolis.orl.mmc.com> Date: Tue, 3 Jan 1995 16:30:47 GMT Date: 1995-01-03T16:30:47+00:00 List-Id: In article <3ebo8f$jlo@theopolis.orl.mmc.com>, Theodore E. Dennison wrote: >jeffe@hathor.CSS.GOV (Jeff Etrick) wrote: >> Dear Language Lawyers, >> >(stuff deleted) >> The LRM references are saying that my type Nuclear_Date_Times may not be >> used in a record represenation clause due to the fact it is not a simple >> static expression. Talking to the vendor about >> this issue I was told that the >> INTEGER conversion is a function and functions are not allowed in simple >> static expressions. >> >> Looking at 4.9(6) "a function_call whose function_name .........." >> tells me that static functions are allowed. >> >> My vendor insists that my program violates the LRM, could you please >> enlighten me on this. Which vendor is executing this program correctly? > >(code deleted) >> type Dates is new Full_Integer range -1 .. 56_613; >(code deleted) >> type Nuclear_Date_Times is new Full_Integer >> range (INTEGER (Dates'first) - 1) * MINUTES_IN_DAY >> .. (INTEGER (Dates'last) * MINUTES_IN_DAY) - 1; > >Your vendor is partly correct; No, your vendor is completely incorrect ;-). "Integer()" is not a function call, it is an explicit conversion. Unlike Ada 83, explicit conversions can be part of a static expression in Ada 95. I suspect they have not yet fully updated their compiler to Ada 95 rules. > ... >Therefore "INTEGER (Dates'first)" and "INTEGER (Dates'last)" are not >static. Integer(Dates'First) and Integer(Dates'Last) are both static in Ada 95. > ... >T.E.D. S. Tucker Taft stt@inmet.com Ada 9X Mapping/Revision Team Intermetrics, Inc. Cambridge, MA 02138