Passing $ as a function argument
bachmeier
no at spam.net
Wed Oct 10 13:23:03 UTC 2018
On Wednesday, 10 October 2018 at 08:46:42 UTC, James Japherson
wrote:
> The usefulness comes from the case when bar is local:
>
> void foo(int loc)
> {
> auto bar = double[RandomPInt+1];
>
> return bar[loc];
> }
>
>
> then foo($) always returns a value and the outside world does
> not need to know about foo. Since $ is a compile thing
No language change is necessary right now if you write one more
character: foo!"$"
More information about the Digitalmars-d
mailing list