Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Actually it’s not. This is to call any other macro (function), the first argument is the name of the macro as a string, and the other arguments are the parameters that will be provided to that macro, which can be of any type and have any name. So it kinds of need to be that way.


Right, so this would be something like Application.Run(macro: Object, arguments: Object...) which would clean it up nicely.


That’s what the definition a bit further down the page says. The header of the page seems to be the function signature so it doesn’t contain any name.


In languages with argument labels, they are part of the signature and show up in the call site.


C# does have optional named parameters (see link below). But it is little help here as this is an old COM library for Excel. The documentation says named parameters are not supported for this method, which is a COM interop limitation but not a limitation of the C# language.

https://docs.microsoft.com/en-us/dotnet/csharp/programming-g...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: