digitalmars.D.learn - Regarding a vector op
- bearophile (12/12) May 21 2013 Currently this code doesn't compile:
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








"bearophile" <bearophileHUGS lycos.com>