> auto chunk = new ubyte[1024]; > foreach(ref x; chunk) x = uniform!"[]"(ubyte.min, ubyte.max);
Thank you all for your replies. @ Timon, I have two questions: 1) How come you can omit parentheses for uniform's parameter, shouldn't it be uniform!("[]")(...) ? 2) Does auto chunk = new ubyte[1024]; ALWAYS create a dynamic array with changeable length? That is a silly question but the syntax confuses me.