DLang Notes and Examples
← prev | next →     Top-level ToC     /functions.html     (printable version)
void main() {
     writeln(not_quite_mult(2, 3));  // 6.1
}

double not_quite_mult(double x, double y) {
    return x * y + 0.1;
}

Arguments are passed in by-value, unless you specify “ref” as the storage class:

double mumble(ref int i, ...) {...}

1 UFCS

D supports UFCS (Uniform Function Call Syntax).

some_fn(arg)
arg.some_fn() // same

Though, UFCS is not related to static member functions:

Thread.sleep()