SlickEdit Product Discussion > Did you know?
Parameter name comments
(1/1)
Dennis:
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: ---void SomeFunction(bool doSomethingWild=true, bool doSomethingBoring=false);
void AnotherFunction(bool yesno)
{
SomeFunction( );
// ^ Press Alt+Comma Here
}
--- End code ---
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):
* /*doSomethingWild*/
* /*doSomethingWild*/false
* /*doSomethingWild*/true
* false
* true
* yesno
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: ---void SomeFunction(bool doSomethingWild=true, bool doSomethingBoring=false);
void AnotherFunction(bool yesno)
{
SomeFunction(/*doSomethingWild*/yesno, /*doSomethingBoring*/true);
}
--- End code ---
Navigation
[0] Message Index
Go to full version