64ビットAIXでデータ型を使用して__int64
いますが、0と比較した場合に奇妙な結果が得られます。
コードスニペット :
__int64 indexExistingPart = GetValue(); // GetValue always returns -1.
if (indexExistingPart < 0 )
{
DoSomething(); //control never comes to this part of the code
}
また、別の変数に0を割り当て__int64
て、比較に使用してみました。ただし、これも機能しませんでした。
__int64 indexExistingPart = GetValue(); // GetValue always returns -1.
__int64 temp =0;
if (indexExistingPart < temp )
{
DoSomething(); //control never comes to this part of the code
}
比較演算子が64ビット整数で機能しないのはなぜですか?回避策はありますか?