[fpc-pascal] Food for thought - language string improvement

noreply at z505.com noreply at z505.com
Tue Jul 11 15:09:41 CEST 2017


On 2017-07-08 08:29, Ched wrote:
> Is this acceptable ?
> 
>> 'SELECT Customers.CustomerName, Orders.OrderID' +
>> 'FROM Customers' +
>> 'FULL OUTER JOIN Orders' +
>> 'ON Customers.CustomerID = Orders.CustomerID' +
>> 'ORDER BY Customers.CustomerName;'
> 
> I think that one have to insert space at some loactions:
> 'SELECT Customers.CustomerName, Orders.OrderID' +
> ' FROM Customers' +
> ' FULL OUTER JOIN Orders' +
> ' ON Customers.CustomerID = Orders.CustomerID' +
> ' ORDER BY Customers.CustomerName;';
> 
> Cheers, Ched
> 

And if it is a multiline string, the compiler may have to convert 
carriage return/new line into a space for you, to allow it to take:

FROM Customers
FULL OUTER JOIN Orders

and convert the carriage return after "Customers" into a space for you..

otherwise it will be:

FROM CustomersFULL OUTER JOIN Orders

..concatenated without a space

Something to be concerned about if implementing it.



More information about the fpc-pascal mailing list