[fpc-devel] Some thoughts on multi-line string support, and a possible syntax that I think is perfectly clean and Pascal-ish.

Ben Grasset operator97 at gmail.com
Fri Jul 5 16:56:33 CEST 2019


On Fri, Jul 5, 2019 at 10:44 AM Ryan Joseph <genericptr at gmail.com> wrote:

> If use {$multilinestringlineending cr} then the string only prints “
> ddd”. If I use {$multilinestringlineending crlf} then all the text prints.
>

Well, CR, (which is to say, #13) is extremely rarely used by itself
(specifically it is native to only one FPC target, that being "classic"
MacOS.)

Almost all other targets use LF (that is, #10) natively, besides Windows
and a few others which use the *combination* of CR and LF natively.

What platform are you yourself on? Most likely, whatever software you were
using to view the output (either a terminal, or a text editor after doing
something like "./Example > output.txt") is simply not designed to
recognize CR *by itself* as a valid line ending. Which is probably fine, as
you would never use that setting unless targeting classic MacOS, or
actually using classic MacOS.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190705/a581322c/attachment.html>


More information about the fpc-devel mailing list