www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Regarding a vector op

Currently this code doesn't compile:

void main() {
     int[2] data = [10, 20];
     double[2] result;
     result[] = data[] * 0.5;
}


It gives the error:
test.d(4): Error: incompatible types for ((data[]) * (0.5)): 
'int[]' and 'double'

Is code like this meant to work?

Bye,
bearophile
May 21 2013