On 18.05.2017 17:20, Mattias Gaertner via Lazarus wrote:
On Thu, 18 May 2017 17:14:03 +0200 Ondrej Pokorny via Lazarus <[email protected]> wrote:[...] IMO, we should create a new option for CodeTools to override string result types for Ctrl+Shift+C. It could be both easy to implement and easy to understand: if the first argument is some kind of 8bit-string (RawByteString/AnsiString/String), and the result is an 8bit string as well, use the argument string type as result type. In this case var S: string; begin X := ExtractFilePath(S); end; should create var S, X: string; begin X := ExtractFilePath(S); end; and not (what is now) var S: string; X: RawByteString; begin X := ExtractFilePath(S); end; A lot of the above issues would never happen.True.
Should I enable it by default? Ondrej -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus-ide.org/listinfo/lazarus
