Named parameters in function call

Dominikus Dittes Scherkl dominikus at
Wed Sep 9 07:57:54 UTC 2020

On Tuesday, 8 September 2020 at 13:28:22 UTC, Cecil Ward wrote:
>     int xcoord;
>     int ycoord;
You can define your own types, of course:

struct xcoord { int x; alias x this; }
struct ycoord { int y; alias y this; }

void myfunc(xcoord x; ycoord y, color c) {}

More information about the Digitalmars-d-learn mailing list