SlickEdit Community

SlickEdit Product Discussion => SlickEdit® => Did you know? => Topic started by: Dennis on June 05, 2020, 05:02:39 pm

Title: Parameter name comments
Post by: Dennis on June 05, 2020, 05:02:39 pm
As 24.0.2, SlickEdit's auto-list compatible parameters feature will offer to insert the parameter name from the function prototype in a comment (for C-like languages) along with other compatible arguments.

For example:
Code: [Select]
void SomeFunction(bool doSomethingWild=true, bool doSomethingBoring=false);
void AnotherFunction(bool yesno)
{
     SomeFunction(      );
                   // ^ Press Alt+Comma Here
}

In the above case, you will see completions like this (you may have to hit Alt+Comma twice if you have auto-list compatible parameters turned off):

This feature was added as a convenience since C/C++ does not have named parameter support yet, and improves readability of code, especially when functions take a literal value as an argument.

Code: [Select]
void SomeFunction(bool doSomethingWild=true, bool doSomethingBoring=false);
void AnotherFunction(bool yesno)
{
     SomeFunction(/*doSomethingWild*/yesno, /*doSomethingBoring*/true);
}