On Saturday, 22 November 2014 at 15:57:40 UTC, ketmar via Digitalmars-d-learn wrote:
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]
  }

Okay, the pointer way really is lame then:)

-Eric

Reply via email to