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

Marcos Douglas B. Santos md at delfire.net
Thu Jul 4 18:50:11 CEST 2019


On Thu, Jul 4, 2019 at 2:32 AM Sven Barth via fpc-devel
<fpc-devel at lists.freepascal.org> wrote:
>
> [...]
> Even if one would say that the whitespace at the start of a line is
> discarded that wouldn't make everyone happy, cause then code like the
> example Ben showed in his mail from today wouldn't work:
>
> === code begin ===
>
> const Help = `Help:
>    -h:
>      Show this help.
>    -i:
>      Print the letter i for no reason.
> `;
>
> === code end ===

IMHO multiline is to write *code* - like SQL - not a formatted string.
But, for formatted string could be:
const Help =
```
  Help:
   -h:
     Show this help.
   -i:
     Print the letter i for no reason.
```;

Yes, started at the beginning without indentation.

regards,
Marcos Douglas


More information about the fpc-devel mailing list