CnPack Forum » CnWizards IDE Wizards » Convert to string change request


2008-8-25 17:54 Edelcom
Convert to string change request

I frquently use the convert to string option to change a pasted sql query into something like :
      Result :=
        'SELECT' +
        'A_FIELD,' +  
        'ANOTHER_FIELD,' +   
        'A_THIRDFIELD' +   
        'FROM A_TABLE '
        'WHERE ...
You get the picture.

I therefore had to delete the standard #10#13 (for Delphi). I Replaced it with a blank.

Howerver at that time two + -signs are present (which is wrong):
        'ANOTHER_FIELD,' +   +
        'A_THIRDFIELD ' +   +
        'FROM A_TABLE '
The second + should be deleted.

Also it would be very helpfull to be able to specify that an extra space should be inserted before the closing '-sign.
        'SELECT ' +
        'A_FIELD, ' +  
        'ANOTHER_FIELD, ' +   
        'A_THIRDFIELD ' +   
        'FROM A_TABLE '
        'WHERE ...
because the string is an sql syntax extra spaces are necessary before any keyword (as FROM and WHERE).

2008-8-28 10:44 Passion
In first step of replacing, why not replace "#13#10 +" with a blank?:)

2008-9-8 17:57 Edelcom
Yes, Passion, I found that out too (look at the middle of my post).
But than I have two +  signs.
I is so easy for you developers to change this behavious ... I'm sure you will do it ,somehere in one of the next builds, no ? :handshake

2008-9-9 21:49 Passion
In the 'Code to String' tool in Editor wizard, if you set the Delphi linebreak from #13#10 to a blank string, the conversion result will contain 2 + sign, which should be only one, is it correct?

If yes, I think I got it and will do the adjustment.

2008-9-10 09:57 Passion
Done. Please try try 442?:lol

页: [1]


Powered by Discuz! Archiver 5.0.0  © 2001-2006 Comsenz Inc.