64 bit integer bizarre results in the case of comparison
===

I am using int64 datatypes on 64 bit AIX and I am getting bizarre results in the case of comparison with 0.

 Code snippet :

 __int64 indexExistingPart =  GetValue(); // GetValue always returns -1.

 if (indexExistingPart < 0 )
{

DoSomething(); //control never comes to this part of the code

}


I have also tried assigning 0 to another  int64 variable and used in in the comparison. However, this also did not work

__int64 indexExistingPart =  GetValue(); // GetValue always returns -1.

__int64 temp =0;

 if (indexExistingPart < temp )
{

DoSomething(); //control never comes to this part of the code

}

 

Why comparison operator is not working for 64 bit integers.

Is there any workaround.

Thanks & Regards,
Sumit

