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,e8c8d1c63ffacf0d X-Google-Attributes: gid103376,public From: Keith Thompson Subject: Re: Constraint checking of actuals passed to Attributes Date: 2000/05/05 Message-ID: #1/1 X-Deja-AN: 619481951 Sender: kst@king.cts.com References: <391250A8.99D1585C@hotmail.com> X-Trace: thoth.cts.com 957511895 47723 205.163.0.22 (5 May 2000 07:31:35 GMT) Organization: CTS Network Services Newsgroups: comp.lang.ada X-Complaints-To: newsmaster@cts.com Date: 2000-05-05T00:00:00+00:00 List-Id: Matt Brennan writes: > Is an implementation required to generate code to check that an actual > parameter passed to an attribute (for example, 'Image of a scalar type) > is subtype conformant with the formal parameter? Yes, but the formal parameter may not be what you expect it to be. In the specific case of 'Image, 3.5(35..36) says: S'Image denotes a function with the following specification: function S'Image(Arg : S'Base) return String So, for example, Natural'Image(-1) is the same as Integer'Image(-1), and will not raise Constraint_Error. -- Keith Thompson (The_Other_Keith) kst@cts.com San Diego Supercomputer Center <*> Welcome to the last year of the 20th century.