Article View: net.lang.ada
Article #1BITNET mail follows
From: EBEL
Date: Sat, 08 Nov 1986 06:41
Date: Sat, 08 Nov 1986 06:41
50 lines
1925 bytes
1925 bytes
In the following Ada program we get an error from our Compiler. It is indeed a
strange constuction, which must be complicated to compile, but it seems to us
a correct Ada Construct. Did we miss something ? N.,Ebel
---- cut here ---------------------------------------------------------------
with TEXT_IO;
with INTEGER_TEXT_IO;
procedure TEST is
type COMPLEX is
record
RE,IM: INTEGER;
end record;
V: COMPLEX := (1,2);
W: COMPLEX := (1,2);
function "*" (V1,V2:COMPLEX ) return INTEGER is
JUNC :COMPLEX;
subtype ST10_TYPE is STRING(1..10);
function "+" (V1,V2:COMPLEX) return INTEGER renames "*";
procedure WRITE_ST10(ST10: "*".ST10_TYPE) is
-- |
-- +------+
-- |
-- Here we have an error message --+
--
begin
TEXT_IO.PUT(ST10);
TEXT_IO.NEW_LINE;
end WRITE_ST10;
begin
WRITE_ST10("1234567890");
if V1 = V2 then
JUNC.RE := V1.RE - 1;
JUNC.IM := V1.IM - 1;
return JUNC+V2;
else
return V1.RE*V2.RE*V1.IM*V2.IM;
end if ;
end "*";
begin
INTEGER_TEXT_IO.PUT(V*W);
end TEST;
Technical Details
Message-ID:
<8611081141.AA27947@ucbvax.Berkeley.EDU>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!utzoo!mnetor!seismo!lll-crg!nike!ucbcad!ucbvax!CLSEPF51.BITNET!EBELShow Full Headers
Complete Article Headers
Message-ID: <8611081141.AA27947@ucbvax.Berkeley.EDU> Subject: BITNET mail follows Date: Sat, 08 Nov 1986 06:41:44 +0000 From: EBEL@CLSEPF51.BITNET Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp!utzoo!mnetor!seismo!lll-crg!nike!ucbcad!ucbvax!CLSEPF51.BITNET!EBEL Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Newsgroups: net.lang.ada Article-I.D.: ucbvax.8611081141.AA27947 Posted: Sat Nov 8 06:41:44 1986 Date-Received: Sun, 9-Nov-86 03:47:38 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet Lines: 49