Array operation with boolean operator

bearophile bearophileHUGS at lycos.com
Thu Mar 14 09:03:48 PDT 2013


> Take a look in Bugzilla if it's already there.

Code for a bug report:


import core.stdc.stdio: printf;
void main() {
     int[3] a = [1, 5, 1];
     int[3] b = [1, 1, 5];
     int[3] c;
     c[] = a[] < b[];
     printf("%d %d %d", c[0], c[1], c[2]);
}


Output:
0 0 0


Expected output:
0 0 1

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list