On 2/27/2016 8:44 AM, Marcos Douglas wrote:
On Sat, Feb 27, 2016 at 6:38 AM, Mark Morgan Lloyd
<markmll.fpc-de...@telemetry.co.uk> wrote:
Marcos Douglas wrote:
Is there any chance to implement in the compiler something link this?

S := "
   insert into t (
     id, description
   ) values (
     1, 'foo'
   )
";

Did you see?

No, I don't see. It looks like an ordinary string to me, except that you're
allowing it to extend over multiple lines somewhat like a unix
here-document.
Here are the differences:

This:
S := "
   insert into t (
     id, description
   ) values (
     1, 'foo'
   )
";

instead of this:
S :=
   'insert into t ( ' +
   '  id, description ' +
   ') values ( ' +
   '  1, ''foo'' ' +
   ')';


Why not simply write:

S := 'insert into t ( id, description ) values ( 1, ''foo'' )';

That also eliminates the problem with your "multi line string enclosed in 
double-quotes" problem of not being clear where and how many spaces are in that 
string...

Just my 2c as to why this is not necessary,

Ralf



---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to