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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED.2l9/+lLWqSFiMnxrrwvdqA.user.gioia.aioe.org!not-for-mail From: Blady Newsgroups: comp.lang.ada Subject: Re: Ada.Text_IO.File_Type object with user defined Get and Put subprograms. Date: Sat, 1 Aug 2020 09:42:18 +0200 Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: 2l9/+lLWqSFiMnxrrwvdqA.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: abuse@aioe.org User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 Content-Language: en-US X-Notice: Filtered by postfilter v. 0.9.2 Xref: reader01.eternal-september.org comp.lang.ada:59619 List-Id: Le 01/08/2020 à 07:35, J-P. Rosen a écrit : > 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 ? Yes I'll try in that way. > 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 There is always use clause for Text_IO in the code, the point is to catch those Put_Line calls with no file parameter.