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

Michael Van Canneyt michael at freepascal.org
Wed Jul 3 21:39:28 CEST 2019



On Wed, 3 Jul 2019, gabor wrote:

> W dniu 2019-07-03 o 20:43, Michael Van Canneyt pisze:
>> But the main question is: do we actually want a multiline string ? As 
>> far as I am concerned, that question needs to be answered first, and for
>> me personally the answer to that is still a resounding "no".
>
> I am also against this, but on the other hand, we could extend 
> {$I}/{$INCLUDE} directive to include file as a string.
>
> E.g:
> const
>   SomeString = {$INCLUDESTR filename.txt};
> var
>   S: String = {$INCLUDESTR filename.txt};
> begin
>   S := {$INCLUDESTR filename.txt};
> ...
>
> or even:
>
> S := 'blah' + {$INCLUDESTR filename.txt} + 'blah';

See the bugreport I indicated.

Michael.


More information about the fpc-devel mailing list