Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

BITNET mail follows

3 views
Skip to first unread message

EB...@clsepf51.bitnet

unread,
Nov 8, 1986, 6:41:44 AM11/8/86
to
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;

0 new messages