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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2813882933f323d0,start X-Google-Attributes: gid103376,public From: adam@irvine.com (Adam Beneschan) Subject: Recursive tagged types Date: 1997/11/07 Message-ID: <878950835.1236@dejanews.com>#1/1 X-Deja-AN: 287780274 X-Http-User-Agent: Mozilla/3.0 (X11; I; Linux 2.0.18 i586) X-Originating-IP-Addr: 192.160.8.44 (dogbert.irvine.com) Organization: Deja News Posting Service X-Authenticated-Sender: adam@irvine.com (Adam Beneschan) X-Article-Creation-Date: Sat Nov 08 01:00:36 1997 GMT Newsgroups: comp.lang.ada Date: 1997-11-07T00:00:00+00:00 List-Id: GNAT outputs TRUE when I run this program. Is this correct according to the Ada rules? -- thanks, Adam with Ada.Tags; with Text_IO; procedure Test1 is Tag1 : Ada.Tags.Tag; Tag2 : Ada.Tags.Tag; procedure Recursive_Procedure (N : in Integer) is type Type1 is tagged null record; type Type2 is new Type1 with record Some_Data : Integer; end record; begin if N = 1 then Tag1 := Type2'Tag; Recursive_Procedure (2); else Tag2 := Type2'Tag; end if; end Recursive_Procedure; begin Recursive_Procedure (1); Text_IO.Put_Line (Boolean'image (Ada.Tags."=" (Tag1, Tag2))); end Test1; -------------------==== Posted via Deja News ====----------------------- http://www.dejanews.com/ Search, Read, Post to Usenet