🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by EBEL Sat, 08 Nov 1986 11:41
BITNET mail follows
#1055
Author: EBEL
Date: Sat, 08 Nov 1986 11:41
49 lines
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;
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads