Re: Array operation a1 + a2 not implemented!

2012-03-18 Thread Timon Gehr
On 03/18/2012 05:37 AM, Caligo wrote: void main() { float[4] a1 = [1, 2, 3, 4]; float[4] a2 = [3, 2, 8, 2]; auto r = a1 + a2; } When are they going to be implemented? I don't know, but this works: void main() { float[4] a1 = [1, 2, 3, 4]; float[4] a2 = [3, 2, 8, 2]; float[

Re: Array operation a1 + a2 not implemented!

2012-03-18 Thread F i L
Caligo wrote: With the latest 2.059 I'm getting 'Error: Array operation a1[] + a2[] not implemented' Must be a bug with 2.059, works in 2.058. But, why aren't there operators for arrays without having to specify "[]"? int[] a, b; int[] r = a + b; Pointer arithmetic maybe?

Re: Array operation a1 + a2 not implemented!

2012-03-17 Thread Caligo
auto r = a1[] + a2[]; > With the latest 2.059 I'm getting 'Error: Array operation a1[] + a2[] not implemented'

Re: Array operation a1 + a2 not implemented!

2012-03-17 Thread H. S. Teoh
On Sat, Mar 17, 2012 at 11:37:15PM -0500, Caligo wrote: > void main() { > float[4] a1 = [1, 2, 3, 4]; > float[4] a2 = [3, 2, 8, 2]; > auto r = a1 + a2; > } > > When are they going to be implemented? Are you trying to concatenate the arrays or sum their elements? Here's how to concatenate: