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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.66.161.130 with SMTP id xs2mr9393783pab.40.1470987895963; Fri, 12 Aug 2016 00:44:55 -0700 (PDT) X-Received: by 10.157.9.106 with SMTP id 97mr528797otp.7.1470987895921; Fri, 12 Aug 2016 00:44:55 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!f6no9310594ith.0!news-out.google.com!d68ni24886ith.0!nntp.google.com!f6no9310584ith.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 12 Aug 2016 00:44:55 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=97.117.196.3; posting-account=x5rpZwoAAABMN2XPwcebPWPkebpwQNJG NNTP-Posting-Host: 97.117.196.3 References: <2cc97e17-313e-44b8-b335-8d5e815e925a@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <4c49991e-9001-464f-afbb-3fcbf78e5656@googlegroups.com> Subject: Re: How to write "Hello" to a text file without a line terminator From: Jerry Injection-Date: Fri, 12 Aug 2016 07:44:55 +0000 Content-Type: text/plain; charset=UTF-8 Xref: news.eternal-september.org comp.lang.ada:31413 Date: 2016-08-12T00:44:55-07:00 List-Id: On Friday, August 12, 2016 at 12:23:55 AM UTC-7, Dmitry A. Kazakov wrote: > No, it does not, if you are talking about the standard library Put. > > It is Put_Line that does. > Both of these programs put a line terminator after Hello. with Ada.Text_IO; use Ada.Text_IO; procedure test_ada_eol is begin Put("Hello"); end test_ada_eol; with Ada.Text_IO; use Ada.Text_IO; procedure test_ada_eol_to_file is Test_Ada_EOL_File : Ada.Text_IO.File_Type; begin Create(Test_Ada_EOL_File, Out_File, "Test Ada EOL.txt"); Put(Test_Ada_EOL_File, "Hello"); Close(Test_Ada_EOL_File); end test_ada_eol_to_file; You can see it directly in the file or on a terminal, optinally with $ ./test_ada_eol |od -a Jerry