D - Bug in associative arrays?
- "Steve Adams" <adamss ascinet.com> Mar 19 2003
- "Walter" <walter digitalmars.com> Mar 21 2003
The following code verifies that v1 and v2 have the expected values, but
shows that v2 is a member of x. It seems that the lookup is using a uint
instead of a ulong?
int main()
{
char[][ulong] x;
ulong v1 = 297321415603;
ulong v2 = 331681153971;
x[v1] = "aa";
printf( "%llu %llu\n", v1, v2 );
if (v2 in x) printf( "wrong\n" );
return( 0 );
}
Mar 19 2003








"Walter" <walter digitalmars.com>