Set null as function array parameter
Oleg via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Jan 12 07:51:15 PST 2015
Hello. How can I call a function with null as parameter, which I
don't want to set. For example:
void foo(ref int[] param1) {}
I can't call this function like:
foo(null);
Is it possible to set default value for an array parameter or
pass null/empty array? I can create empty array and pass it, but
it looks ugly:
int[] x;
foo(x);
Thanks.
More information about the Digitalmars-d-learn
mailing list