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

Sven Barth pascaldragon at googlemail.com
Thu Jul 4 07:19:26 CEST 2019


Am 04.07.2019 um 00:21 schrieb Ryan Joseph:
>
>> On Jul 3, 2019, at 5:48 PM, Sven Barth via fpc-devel <fpc-devel at lists.freepascal.org> wrote:
>>
>> In case case of readability: most cases of multi line string constants are likely to be embedded scripts (shaders, SQL, whatever) and thus the $INCLUDESTRING directive mentioned in the bug report is much more useable, because it allows you to view the embedded file in its own editor together with syntax hightlighting and possibly code completion.
> Why is this any better than just loading the string at runtime? You’re right it’s probably better to have separate files most of the time but it’s nice to just toss things into source files sometimes for quick and dirty stuff.
Because it's part of the binary then; less stuff to distribute or to get 
lost. Similar with resources. In fact one could already use {$R ...} to 
load such files contained in the binary, but loading them is a bit more 
involved than simply using a string.

Regards,
Sven


More information about the fpc-devel mailing list