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,75b74a06c7b14eed,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1994-12-10 01:13:28 PST Path: bga.com!news.sprintlink.net!hookup!news.mathworks.com!udel!gatech!howland.reston.ans.net!paladin.american.edu!auvm!GTEWD.MTV.GTEGSC.COM!papayd Comments: Gated by NETNEWS@AUVM.AMERICAN.EDU Newsgroups: comp.lang.ada Message-ID: <00988B51.1523CFA0.69@gtewd.mtv.gtegsc.com> Date: Sat, 10 Dec 1994 00:54:42 PST Sender: Ada programming language From: Dave Papay M/S 7G32 x2791 Subject: Conformance problem in VAX Ada? Date: 1994-12-10T00:54:42-08:00 List-Id: While writing some code, I accidentally put different default expressions for a parameter in the declaration and body of a procedure. Here's what it looked like, except that procedure Error did some real work ;-) : with Text_IO; procedure Test is procedure Error (I : in Integer := Integer'First); procedure Error (I : in Integer := Integer'Last) is begin Text_IO.Put_Line (Integer'Image (I)); end Error; begin Error; end Test; I compiled it using VAX Ada v2.3-3 under VAX/VMS v5.5-2. The compiler didn't complain, and I didn't discover the error until I started seeing the effects of using Integer'Last, rather than Integer'First (which is what I really wanted). I read over the conformance rules for subprograms, and (as far as I can determine) I don't think these two specifications conform. The compiler thinks they do. Is this a compiler problem, or am I missing something in the conformace rules? | | David Papay | o | papay@acm.org (preferred) | ^/--- | insert your favorite dpapay@aol.com (alternate) | /> | disclaimer here | | | fleche! |