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.50.141.135 with SMTP id ro7mr2536535igb.7.1413965548225; Wed, 22 Oct 2014 01:12:28 -0700 (PDT) X-Received: by 10.140.20.175 with SMTP id 44mr621276qgj.4.1413965548080; Wed, 22 Oct 2014 01:12:28 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!h18no8651635igc.0!news-out.google.com!u5ni11qab.1!nntp.google.com!k15no862qaq.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 22 Oct 2014 01:12:27 -0700 (PDT) In-Reply-To: <87d29kfwip.fsf@ludovic-brenta.org> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=158.110.27.77; posting-account=9fwclgkAAAD6oQ5usUYhee1l39geVY99 NNTP-Posting-Host: 158.110.27.77 References: <7c1b89e6-9ab8-4faa-b60c-c5c4683f0bff@googlegroups.com> <87d29kfwip.fsf@ludovic-brenta.org> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Assembling Complex Strings Containing Carriage Returns Prior to Using Ada.Text_IO.Put? From: mockturtle Injection-Date: Wed, 22 Oct 2014 08:12:28 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:22655 Date: 2014-10-22T01:12:27-07:00 List-Id: On Wednesday, October 22, 2014 8:28:48 AM UTC+2, Ludovic Brenta wrote: > mockturtle writes: >=20 > > On Wednesday, October 22, 2014 7:57:39 AM UTC+2, NiGHTS wrote: >=20 > >> I am converting some code from C to Ada which involves building a >=20 > >> complex string containing '\n' characters which would eventually be >=20 > >> displayed on the standard output console using the printf() >=20 > >> function. >=20 > [...] >=20 > >> EOL : String :=3D ASCII.CR'Img; >=20 > [...] >=20 > > EOL : constant Character :=3D ASCII.CR; >=20 > '\n' is not ASCII.CR, it is ASCII.LF, by the way. And on some > nonstandard platforms, the C compiler translates '\n' into a sequence of > two characters, ASCII.CR & ASCII.LF. >=20 > Oops! touch=E9...=20 =20 >=20 > --=20 >=20 > Ludovic Brenta.