Date
1 - 3 of 3
Swift definition of "_"
Dave
Hi All,
In a definition like this: func NSLocationInRange(_ loc: Int, _ range: NSRange) -> Bool What does the “_” by itself mean? I can’t seem to find anywhere in the documentation where this is mentioned? If its in there somewhere I’d appreciate a pointer to it. Thanks in Advance Dave
|
|
Bernie Maier
On Tue, 17 Sep 2019, at 8:28 PM, Dave wrote:
Hi All,It means the corresponding function argument does not have a parameter label when **calling** the function. So you would call via something like: NSLocationInRange(42, someRange)This is documented in the Swift Language Guide (https://docs.swift.org/swift-book/LanguageGuide/Functions.html) Omitting Argument LabelsCheers, Bernie
|
|
Dave
Thanks, found it now. The documentation is pretty good, a cross reference/index would be icing of the cake!
toggle quoted messageShow quoted text
Cheers Dave
On 17 Sep 2019, at 13:39, Bernie Maier <apple-dev@...> wrote:
|
|