Article View: net.lang.ada
Article #1055BITNET mail follows
From: EBEL
Date: Sat, 08 Nov 1986 11:41
Date: Sat, 08 Nov 1986 11:41
49 lines
1745 bytes
1745 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:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!nike!ucbcad!ucbvax!CLSEPF51.BITNET!EBELShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!lll-crg!nike!ucbcad!ucbvax!CLSEPF51.BITNET!EBEL From: EBEL@CLSEPF51.BITNET Newsgroups: net.lang.ada Subject: BITNET mail follows Message-ID: <8611081141.AA27947@ucbvax.Berkeley.EDU> Date: Sat, 8-Nov-86 06:41:44 EST 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