From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail From: "J-P. Rosen" Newsgroups: comp.lang.ada Subject: Re: Ada.Text_IO.File_Type object with user defined Get and Put subprograms. Date: Sat, 1 Aug 2020 07:35:49 +0200 Organization: Adalog Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Sat, 1 Aug 2020 05:35:47 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="59b734f4ede6d76adb243a512322c3e2"; logging-data="3933"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19kr7mIDbmhemBZaepsq39H" User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 Cancel-Lock: sha1:0P9pE+5rV+vbhhPKRRLwiDiRlw0= In-Reply-To: Content-Language: fr Xref: reader01.eternal-september.org comp.lang.ada:59618 List-Id: Le 31/07/2020 à 19:06, Blady a écrit : > The simplest solution (I found) is to add a virtual dummy Text_IO > package (name My_TIO) with Put_Line defined inside processing the values > and sending the lines to the other process if needed. Looks reasonable > And I replaced everywhere with "Ada.Text_IO;" by "with My_TIO;". > But Text_IO is also used for file management inside the legacy code > which made me going to wrap all the Text_IO stuff :-( Did you think that you can simply use "renames" to reexport the operations of Text_IO from My_TIO ? You could also leave Text_IO and My_TIO. Use Adasubst to automatically change all the special operations from Text_IO to My_TIO. https://www.adalog.fr/en/components.html#adasubst -- J-P. Rosen Adalog 2 rue du Docteur Lombard, 92441 Issy-les-Moulineaux CEDEX Tel: +33 1 45 29 21 52, Fax: +33 1 45 29 25 00 http://www.adalog.fr