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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.albasani.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: strange length check error Date: Thu, 18 Jan 2018 01:00:45 +0200 Organization: Tidorum Ltd Message-ID: References: <14a35359-150a-4aa6-b437-19c74381be4b@googlegroups.com> <54e04919-3a18-4b18-8733-1445af3a6229@googlegroups.com> <6018001a-119d-420f-aac5-d6d463d83778@googlegroups.com> <8bd89f13-4ae1-474d-a78d-459fbb8a737c@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net 8B/esheZEYCl7sLjv5Kn/Am2qjHM9/fq5pl89ozqLOuSLrR9H6 Cancel-Lock: sha1:z1fiBvtojV+I/uFgfYbW3mQ0BgY= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 In-Reply-To: Xref: reader02.eternal-september.org comp.lang.ada:49969 Date: 2018-01-18T01:00:45+02:00 List-Id: On 18-01-17 21:43 , Simon Wright wrote: > Not sure what the problem is, but this looks like a case where you > should *not* 'use Ada.Text_IO;', especially in the spec. On 18-01-17 23:37 , Mehdi Saada wrote: > Ah ? Ah how am I gonna use File_Type then ? I can't do otherwise. By qualifying with the name of the package in which it is defined: function Get_Line ( File : Ada.Text_IO.File_Type := Ada.Text_IO.Standard_Input ) return Bounded_String; > If there is a way to do IO without Ada.Text_IO, I'm open. As I understood Simon (but perhaps I should have let him answer), the point was to say only with Ada.Text_IO; but *not* add use Ada.Text_IO; because you are defining operations (Get_Line, Put_Line, ...) with the same names as operations in Ada.Text_IO, and you could get into problems with one definition hiding another. The question "to 'use', or not to 'use'" is a big discussion in Ada-land, with people having different styles and preferences. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .