Re: Operations on all array elements = access to memory outside array

2012-07-17 Thread Daniel Murphy
fded fded.cmlx...@gmail.com wrote in message news:jjxlvtkcohzeseqbi...@forum.dlang.org... I used: DMD32 D Compiler v2.059 on windows 7. On Monday, 16 July 2012 at 18:24:36 UTC, fded wrote: I tested this code: [...] For information, I was testing how []+ were handling smaller array

Operations on all array elements = access to memory outside array

2012-07-16 Thread fded
I tested this code: import std.stdio; void main(){ double[] a=[1,2]; double[10] c; c[]=a[]+0.; writeln(c); double[] b=[1,2,3,4,5,6,7,8,9,10]; double[10] d; double[] e=b[0..2]; d[]=e[]+0.; writeln(e);

Re: Operations on all array elements = access to memory outside array

2012-07-16 Thread fded
I used: DMD32 D Compiler v2.059 on windows 7. On Monday, 16 July 2012 at 18:24:36 UTC, fded wrote: I tested this code: [...] For information, I was testing how []+ were handling smaller array (e.g. Error? completed with nan? completed with 0.? cyclic computation?)