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.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e044473b43baaf18 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-05-23 16:57:50 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!colt.net!peernews3.colt.net!news0.de.colt.net!eusc.inter.net!cs.tu-berlin.de!not-for-mail From: Stephan Heinemann Newsgroups: comp.lang.ada Subject: Re: automatic tag conversion? Date: 23 May 2003 23:57:49 GMT Organization: Technische Universitaet Berlin, Deutschland Message-ID: References: NNTP-Posting-Host: fiesta.cs.tu-berlin.de Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: news.cs.tu-berlin.de 1053734269 16264 130.149.17.4 (23 May 2003 23:57:49 GMT) X-Complaints-To: news@cs.tu-berlin.de NNTP-Posting-Date: 23 May 2003 23:57:49 GMT User-Agent: tin/1.4.6-20020816 ("Aerials") (UNIX) (SunOS/5.8 (sun4u)) Xref: archiver1.google.com comp.lang.ada:37725 Date: 2003-05-23T23:57:49+00:00 List-Id: Stephan Heinemann wrote: > t: Tag; > subvar: Subtype; > ... > t := supervar'Tag; > subvar := t'convert(supervar); -- convert(t, supervar) > polymorphic(subvar); Of course I don't know what the concrete Subtype is and I don't wanna know. Therefore the code snippet is wrong. I meant: polymorphic(t'convert(supervar)) or better and safer (because t may describe a Type not within Supertype) polymorphic(supervar'TagType) It is not my lazyness, but I'd like to extend my code without updating conditionals on Strings. For every new Subtype of Supertype I not only need to overload the polymorphic procedure but also a String comparation. Thanks, Stephan