www.digitalmars.com         C & C++   DMDScript  

D - array ops?

reply "Carlos Santander B." <carlos8294 msn.com> writes:
I know array ops are not implemented yet, but IIRC this showed a message
telling so:

void foo() {
    ubyte [] x = new ubyte[2];
    x[] = x[] - x[0];
}

Now I get: incompatible types for ((x[]) - (cast(int)(x[0]))): 'ubyte[]' and
'int'

-------------------------
Carlos Santander


---

Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.528 / Virus Database: 324 - Release Date: 2003-10-16
Oct 19 2003
parent "Walter" <walter digitalmars.com> writes:
"Carlos Santander B." <carlos8294 msn.com> wrote in message
news:bmvfct$8ag$1 digitaldaemon.com...
 I know array ops are not implemented yet, but IIRC this showed a message
 telling so:

 void foo() {
     ubyte [] x = new ubyte[2];
     x[] = x[] - x[0];
 }

 Now I get: incompatible types for ((x[]) - (cast(int)(x[0]))): 'ubyte[]'

 'int'

Yes, that's a symptom of array ops not being implemented yet.
Oct 22 2003