[Lazarus] How about Ctrl+Shift+Alt+Space completes code with empty values.
Lukasz Sokol
el.es.cr at gmail.com
Wed Feb 15 10:21:57 CET 2012
On 14/02/2012 17:43, Everton Vieira wrote:
> How about Ctrl+Shift+Alt+Space completes the code with empty values.
>
> Like this:
>
> Trim();
>
> After Ctrl+Shift+Alt+Space inside that parentheses makes this:
>
> Trim('');
>
> Just, another idea. :)
>
Trim is bad example :) but if you wanted Ctrl+Shift+Alt+Space to expand, e.g.
AnsiReplaceString()
into
AnsiReplaceString('','','')
What would you put as 'empty' parameter for functions that have numeric meaning,
and don't really tolerate 0 as input
(hypothetical: function Divide(A: integer; B: integer):Real;
if you expand Divide() to Divide(0,0) and forget to put some meaningful constant into B
(or variable) you'll end up with executing div/0 and as such, an error)
As such such expansion IMO is futile.
L.
More information about the Lazarus
mailing list