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,b007c42c7898f4ef X-Google-Attributes: gid103376,public From: Mark A Biggar Subject: Re: First attribute on Enumerated types Date: 1999/02/24 Message-ID: <36D41C20.D5B8F61E@lmco.com>#1/1 X-Deja-AN: 447924911 Content-Transfer-Encoding: 7bit References: <001e01be5f9d$ebe4d7e0$5b824a0c@rogers> <36D3678F.6C3CB1F6@aasaa.ofe.org> Content-Type: text/plain; charset=us-ascii Organization: Lockheed Martin Western Development Labs Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-02-24T00:00:00+00:00 List-Id: David Starner wrote: > Since I quickly composed the first message, here's the actual code. > Color is definitely a type. It should be enumerated - is there any > way to tell the compiler that? In retrospect, that's probably my error. > > with Lists; > generic > type Node_type is private; > type Color is private; change this to: type Color is (<>); That will restrict Color to either an emumeration or an integer range. Now if you write the body code so that it only uses 'first, 'last, 'succ, 'pred, etc. it should work correctly given any discrete type. -- Mark Biggar mark.a.biggar@lmco.com