Structs and Variadic Functions (Keyword arguments)
Pragma
ericanderton at yahoo.removeme.com
Tue Jan 9 09:28:36 PST 2007
Xinok wrote:
> Don Clugston Wrote:
>
>> Bill Baxter wrote:
>>> And this one's not about keyword args, but about default parameters and
>>> function pointers in general. Started by Don Clugston.
>>> http://www.digitalmars.com/d/archives/digitalmars/D/27291.html
>> Wow! That was my third ever D post!
>
> While this post is still here, I'd like to make this suggestion:
> We have the 'default' keyword, let's use it!
>
> void func(int a = 15, int b = 30, int c = 45);
> func(45, default, 60);
Neat.
I suppose 'default' could be used for non default args as well?
void foo(int x);
foo(default); // x = int.init
--
- EricAnderton at yahoo
More information about the Digitalmars-d
mailing list