September 06, 2004 vector operations | ||||
|---|---|---|---|---|
| ||||
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
| ||||
September 07, 2004 Re: vector operations | ||||
|---|---|---|---|---|
| ||||
Posted in reply to Dan | 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 > > | |||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply