Witold Baryluk <> changed:

           What    |Removed                     |Added
                 CC|                            |

--- Comment #3 from Witold Baryluk <>  2009-08-10 
05:10:34 PDT ---
Hi, i just tried in DMD 1.043

int a[8], c[8];

and given me this nonsensical error. I know this is redudant, but is there to
allow C style declarations. I just switch many times from C to D, and sometimes
forgot where am I.

In declarations.html we read:
"In a declaration declaring multiple symbols, all the declarations must be of
the same type:
 int x,y;    // x and y are ints
 int* x,y;    // x and y are pointers to ints
 int x,*y;    // error, multiple types
 int[] x,y;    // x and y are arrays of ints
 int x[],y;    // error, multiple types

I was all my life (actually life when i use D, so about 3 years) thinking this
means, that:

int[8] a,b,c;

is equivalent of

int a[8], b[8], c[8];

how about adding to spec example this entries:
 int[2] x,y;     // x and y are static arrays of ints
 int x[2],y;     // error, multiple types
 int x[2],y[2];  // error, multiple types
 int x[2],y[3];  // error, multiple types

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to