From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,fba93c19bb4e7dbd X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-07-11 03:05:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!oleane.net!oleane!nnrp.oleane.net!skymaster!nobody From: "Jean-Pierre Rosen" Newsgroups: comp.lang.ada Subject: Re: Endless loop by dispatching Date: Fri, 11 Jul 2003 11:46:09 +0200 Organization: Adalog Message-ID: References: NNTP-Posting-Host: mailhost.axlog.fr X-Trace: s1.read.news.oleane.net 1057917665 17789 195.25.228.57 (11 Jul 2003 10:01:05 GMT) X-Complaints-To: abuse@oleane.net NNTP-Posting-Date: Fri, 11 Jul 2003 10:01:05 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Xref: archiver1.google.com comp.lang.ada:40187 Date: 2003-07-11T11:46:09+02:00 List-Id: "Michael Erdmann" a �crit dans le message de news:un82u-4kb.ln1@boavista.snafu.de... [SNIP] > Does any body know, what this loop causes?! I am not sure > if this is a bug or simply i missed the point. > You missed the point :-) Serialize is a general entry point, which dispatches to Write. If you call it again from Write, it will redispatch to Write, hence the loop. Now do you think that Write of B is really Serialize of A, plus something else? Isn't it *Write* of A, plus something else? If you change your package to package body B is procedure Write( This : in Object ) is begin A.Write( A.Object( This ) ); Put_Line( "Q =" & Natural'Image(This.Q)); end Write; end B; It will be OK. Oh, by the way, why do you need Serialize at all? Since all it does is call Write, why don't you call Write directly? -- --------------------------------------------------------- J-P. Rosen (rosen@adalog.fr) Visit Adalog's web site at http://www.adalog.fr