D - vector operations
- Dan (18/18) Sep 06 2004 Please, why the following code:
- Ilya Minkov (13/39) Sep 07 2004 Whole-vector math has not been implemented yet, and i recall the manual
Please, why the following code:
int main (char[][] args)
{
int[] a;
int[] b;
a.length=5;
a[]=3;
b[] = 2*a[] ;
return 0;
}
produces the compiler error (on line 10):
"
: incompatible types for ((2) * (a[])): 'int' and 'int[]'
: 'a[]' is not an arithmetic type
"
?
Thank you very much for help,
Dan M. Ripa
Sep 06 2004
Whole-vector math has not been implemented yet, and i recall the manual
states it somewhere, though probably at a surprisingly unrelated spot.
BTW, this newsgroup is dead. If you have any further questions, you may
want to post them here:
(NNTP server:)
news://news.digitalmars.com/digitalmars.D
(Web interface:)
http://www.digitalmars.com/drn-bin/wwwnews?digitalmars.D
You may also want to make yourself comfortable on our Wiki:
http://www.prowiki.org/wiki4d/wiki.cgi?FrontPage
http://www.prowiki.org/wiki4d/wiki.cgi?FaqRoadmap
-eye/PaC
Dan schrieb:
Please, why the following code:
int main (char[][] args)
{
int[] a;
int[] b;
a.length=5;
a[]=3;
b[] = 2*a[] ;
return 0;
}
produces the compiler error (on line 10):
"
: incompatible types for ((2) * (a[])): 'int' and 'int[]'
: 'a[]' is not an arithmetic type
"
?
Thank you very much for help,
Dan M. Ripa
Sep 07 2004








Ilya Minkov <minkov cs.tum.edu>