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.52.120.11 with SMTP id ky11mr21657246vdb.3.1413999148638; Wed, 22 Oct 2014 10:32:28 -0700 (PDT) X-Received: by 10.50.79.231 with SMTP id m7mr431374igx.11.1413999148538; Wed, 22 Oct 2014 10:32: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!eu.feeder.erje.net!feeder.erje.net!us.feeder.erje.net!newspeer1.nac.net!border2.nntp.dca1.giganews.com!nntp.giganews.com!cm18no363144qab.0!news-out.google.com!rp1ni442igb.0!nntp.google.com!uq10no15710836igb.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 22 Oct 2014 10:32:28 -0700 (PDT) In-Reply-To: <87d29kfwip.fsf@ludovic-brenta.org> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=66.126.103.122; posting-account=KSa2aQoAAACOxnC0usBJYX8NE3x3a1Xq NNTP-Posting-Host: 66.126.103.122 References: <7c1b89e6-9ab8-4faa-b60c-c5c4683f0bff@googlegroups.com> <87d29kfwip.fsf@ludovic-brenta.org> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <1cc7dace-72d5-46c7-9e32-b4b857997ef7@googlegroups.com> Subject: Re: Assembling Complex Strings Containing Carriage Returns Prior to Using Ada.Text_IO.Put? From: Adam Beneschan Injection-Date: Wed, 22 Oct 2014 17:32:28 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:22670 Date: 2014-10-22T10:32:28-07:00 List-Id: On Tuesday, October 21, 2014 11:28:48 PM UTC-7, Ludovic Brenta wrote: > '\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. Only when the character is processed for output, I think (to standard output or to a file). Is there really a C compiler which will output 5 for this? char str[] = "abc\n"; printf("%d\n", strlen(str)); -- Adam