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.4 required=5.0 tests=BAYES_50,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,5d794d299ccf85ec X-Google-Attributes: gid103376,public From: sb463ba@l1-hrz.uni-duisburg.de (Georg Bauhaus) Subject: Re: private "subtype"s Date: 2000/10/10 Message-ID: <8s02li$8jv$1@news-hrz.uni-duisburg.de>#1/1 X-Deja-AN: 679895507 References: <8rsubg$ka7$1@news-hrz.uni-duisburg.de> <8rt85j$hg7$1@nnrp1.deja.com> Organization: Gerhard-Mercator-Universitaet - Gesamthochschule Duisburg Newsgroups: comp.lang.ada Date: 2000-10-10T00:00:00+00:00 List-Id: Ted Dennison: : That makes a little bit of sense. At least :-) I started thinking it doesn't and only made things awkwardly complex. So would I be better off using some tagged records for the following example? package Society is type Person is (Dumb, Boring, Average, Skilled, Smart, Clever, Genius, Freaky); -- (rather incomplete) end Society; generic How_Many: Positive; -- counting the crowd package Society.Club is -- sub- type Correct_People is private; -- a selection of more distinguished persons type Participants is array(1..How_Many) of Correct_People; procedure Party(P: Participants); procedure Celebrate(P: Participants) renames Party; -- stay PC private -- sub- type Correct_People is new Person range Smart..Genius; end Society.Club; generic How_Many: Positive; -- counting the crowd package Society.Joe_Bloggs is -- sub- type Cheap_Flat_People is private; -- a selection of persons type Participants is array(1..How_Many) of Cheap_Flat_People; procedure Party(P: Participants); procedure Get_Drunk(P: Participants) renames Party; -- well, maybe private -- sub- type Cheap_Flat_People is new Person range Dumb..Average; -- if you can believe this end Society.Joe_Bloggs; The admittedly vague idea in the code is to have someone like Groucho Marx enter the Club and not having to be converted to another type of person... But with "-- sub-"types below it looks like requiring constraints to trigger similar things like types can do. Yes, so there...