From: Dave Papay M/S 7G32 x2791 <papayd@GTEWD.MTV.GTEGSC.COM>
Subject: Conformance problem in VAX Ada?
Date: Sat, 10 Dec 1994 00:54:42 PST
Date: 1994-12-10T00:54:42-08:00 [thread overview]
Message-ID: <00988B51.1523CFA0.69@gtewd.mtv.gtegsc.com> (raw)
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! |
next reply other threads:[~1994-12-10 8:54 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-12-10 8:54 Dave Papay M/S 7G32 x2791 [this message]
1994-12-12 16:10 ` Conformance problem in VAX Ada? Norman H. Cohen
1994-12-16 13:49 ` Robert Dewar
1994-12-13 9:05 ` Andreas Schulz RIT14
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox