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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: =?UTF-8?B?QmrDtnJuIEx1bmRpbg==?= Newsgroups: comp.lang.ada Subject: Re: Re-write a file in Ada Date: Mon, 11 Jan 2016 11:09:23 +0100 Organization: A noiseless patient Spider Message-ID: References: <77e47c8b-7dcc-4e86-8f89-1f348cdf08dd@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Mon, 11 Jan 2016 10:06:42 -0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="6a09ccc49493ecf301ef65af9aa456c7"; logging-data="6500"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+WNLpPXGZY+BmPIKUKMWtk" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.8.0 In-Reply-To: Cancel-Lock: sha1:k4Zpu1+5g/SNDM7W0LD0SyQuxUM= Xref: news.eternal-september.org comp.lang.ada:29086 Date: 2016-01-11T11:09:23+01:00 List-Id: On 2016-01-10 23:57, comicfanzine@gmail.com wrote: > Thanks björn lundin and the others ! > > I finally suceed : > > WITH Ada.Text_IO ; USE Ada.Text_IO ; > WITH Ada.Text_IO.Unbounded_IO ; USE Ada.Text_IO.Unbounded_IO ; > WITH Ada.Strings.Unbounded ; USE Ada.Strings.Unbounded ; > > Procedure main is ... Compare your code to mine. what is the array for ? what kind of manipulating are you doing ? To me it looks like you are doing nothing more that storing the lines in an array, and then write the array to a new file. Why? And why not doing that in the loop in my example? And as others pointed out: Get_Line will get you the whole line, and next call will get you the whole NEXT line, so Set_Line is not needed. -- -- Björn