May 22, 2013 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
| ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply