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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,40843b637af826a X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.204.145.215 with SMTP id e23mr2306767bkv.0.1354676729690; Tue, 04 Dec 2012 19:05:29 -0800 (PST) Path: i11ni21377wiw.0!nntp.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!85.12.40.130.MISMATCH!xlned.com!feeder1.xlned.com!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!border2.nntp.ams2.giganews.com!border1.nntp.ams2.giganews.com!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!rt.uk.eu.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: IBM 437 encoded String to UTF-16 Wide_String Date: Thu, 29 Nov 2012 22:03:35 +0100 Organization: cbb software GmbH Message-ID: References: <11112110-03b1-4977-ba80-00204926ea23@googlegroups.com> <68663891-14ad-4780-a00d-1cc48ed75323@googlegroups.com> <027679a1-dc5e-4888-9dd1-2a4ccf32e66c@googlegroups.com> <50b5dcd0$0$6581$9b4e6d93@newsspool3.arcor-online.net> <1mefvxxar8vn3$.16pejjtgf8hhg.dlg@40tude.net> <50b5f60e$0$9524$9b4e6d93@newsspool1.arcor-online.net> <347rnekt4in1.12pbyz0phdelf$.dlg@40tude.net> <50b615d5$0$6584$9b4e6d93@newsspool3.arcor-online.net> <11j81z9v2gr02$.kxnnq6lqzoz$.dlg@40tude.net> <50b64b47$0$6571$9b4e6d93@newsspool3.arcor-online.net> <1e9k8c3tgm89w$.v1ty0n5ucjqv.dlg@40tude.net> <50b73013$0$6576$9b4e6d93@newsspool3.arcor-online.net> <3lyk4h2cmhu3$.ajovidbaq9z9.dlg@40tude.net> <50b76b9e$0$6572$9b4e6d93@newsspool3.arcor-online.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: kWJV5lTRAyCzy8lsfOrlcw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2012-11-29T22:03:35+01:00 List-Id: On Thu, 29 Nov 2012 15:05:19 +0100, Georg Bauhaus wrote: > On 29.11.12 11:52, Dmitry A. Kazakov wrote: >> On Thu, 29 Nov 2012 10:51:27 +0100, Georg Bauhaus wrote: >> >>> - if I want my subprograms to work with different >>> types of strings, >> >> type A is new B; -- Ada 83 > > type A is new Root_String'Class; -- not Ada Rather: type My_Incompatible_String is new String; -- Ada 83 Yes, Ada 95 broke that for tagged typed. Presently, the workaround is this: type Base is abstract tagged ...; -- Define operations to clone here type A is new Base with null record; type B is new Base with null record; Now B has the semantics of cloned A. type B is new A; In any case, you cannot clone classes, you should their root types instead. That will have the effect of cloning the class. >>> this particular kind of problem can be solved with the help of a >>> generic formal package that a user of my programs has instantiated, >> >> Egh, which problem? > > That of making a subprograms work with any type of > string in current Ada. And how generic container library may help? Generic instances do not comprise a run-time class, which is their major flaw. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de