Em 15/02/2012, às 07:21, Lukasz Sokol escreveu:
> 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
As a code complementation suggestion theres no need to put 0 instead is better
only put the comma when the parameter is required.
> (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.
This idea came when i had to type about ten times a function like this func('',
'', [], '', [] , []); wich time the parameters changed, of course i did ctrl+c
ctrl+v. This would be only a very subtle behavior. Like every one knows,
details are in the art of the elegancy.
>
> L.
>
>
> --
> _______________________________________________
> Lazarus mailing list
> [email protected]
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus