On Sat, 22 Nov 2014 15:45:51 +0000
Eric via Digitalmars-d-learn <digitalmars-d-learn@puremagic.com> wrote:

> Maybe this is not so lame because change() can take
> any length of static array.

  void change (int[] arr) {
    arr[1] = 42;
  }

  void main () {
    int[$] a = [1, 2, 3];
    change(a);
    import std.stdio : writeln;
    writeln(a); // [1, 42, 3]
  }

Attachment: signature.asc
Description: PGP signature

Reply via email to