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@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
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to