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,18069d15345a10c8 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-10-14 05:59:32 PST Newsgroups: comp.lang.ada Path: bga.com!news.sprintlink.net!howland.reston.ans.net!europa.eng.gtefsd.com!library.ucla.edu!csulb.edu!nic-nac.CSU.net!charnel.ecst.csuchico.edu!csusac!csus.edu!netcom.com!hbaker From: hbaker@netcom.com (Henry G. Baker) Subject: Re: Modulus and Remainder operations (Was Re: Help with a bit of C code) Message-ID: Organization: nil References: <1994Oct11.161048.1058@nosc.mil> <37er8t$oh0@watnews1.watson.ibm.com> Date: Thu, 13 Oct 1994 01:51:34 GMT Date: 1994-10-13T01:51:34+00:00 List-Id: In article <37er8t$oh0@watnews1.watson.ibm.com> ncohen@watson.ibm.com writes: >4. In Ada 9X, the parameter-passing mechanism is mandated in many cases > where Ada 83 leaves it up to the implementation. In the cases where > it is still up to the implementation, the crime of "relying" on a > particular mechanism has been more precisely defined and its severity > has been reduced from "erroneous execution" (a captial offense) to > "bounded error" (a noncapital felony). If a formal parameter has more > than one "access path" (i.e., it is "aliased" in the pre-Ada-9X sense) > and it is updated by one name, then examined by the other name, the > possible outcomes are that the examination will yield the old value, > that the examination will yield the new value, or (science fiction) > that your very clever compiler will catch this error and raise the > exception Program_Error. See RM9X-6.2(12) for the details. So I've been told. But this policy is still a crock, especially for Ada 'limited' types, because the definer of the type has lost control of the type. The 'textbook' definitions of prototypical limited types such as 'bank accounts' are no longer safe in the presence of such equivocation. See "How to Steal from a Limited Private Account--Why Mode INOUT Parameters for Limited Types MUST be Passed by Reference". Ada Letters XIII, 3 (May/June 1993), 91-95. This paper is also in my ftp directory. Henry Baker Read ftp.netcom.com:/pub/hbaker/README for info on ftp-able papers.