RosettaCodeData/Task/Call-a-function/Ecstasy/call-a-function-5.ecstasy

13 lines
318 B
Plaintext

module CallNamedArgsFunc {
static String foo(Int a=1, Int b=2, Int c=3) {
return $"a:{a}, b:{b}, c:{c}";
}
void run() {
@Inject Console console;
console.print($"{foo(c=9, b=8, a=7)=}");
console.print($"{foo(4, c=6, b=5)=}");
console.print($"{foo(c=99)=}");
}
}