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

Marco van de Voort fpc at pascalprogramming.org
Thu Jul 4 16:09:43 CEST 2019


Op 2019-07-04 om 15:47 schreef Ben Grasset:
> On Thu, Jul 4, 2019 at 9:35 AM Marco van de Voort 
> <fpc at pascalprogramming.org <mailto:fpc at pascalprogramming.org>> wrote:
>
>     New magic characters in the scanner. Yeah. Really nice (NOT!) 
>
>
> It's not magic. It's exactly the same thing as the single quote 
> currently is, but denoting multi-line strings specifically.
> On Thu, Jul 4, 2019 at 9:35 AM Marco van de Voort 
> <fpc at pascalprogramming.org <mailto:fpc at pascalprogramming.org>> wrote:
>
>     const
>
>          singleline = ' accidentally not terminated;
>
>        // lots of lines
>
>          singleline2 = '   `this is a legal string with backticks`';
>
>
> You clearly do not understand how it works, still. That would not / 
> does not compile, because the first string, which is *single-line as 
> it always has been*, is indeed unterminated. You'd get "string exceeds 
> end of line."
>
You clearly didn't read the message fully. It is not about compiler/not 
compile, but in the case of not compile what the error is and where.


More information about the fpc-devel mailing list