A
Andreas Eibach
Hi,
supposed I have this alone:
(mentally add typedefs )
uchar byte1, byte2;
ulong a1, a2, b1, b2;
uchar getOffset (ulong, ulong);
uchar getOtherOffset (ulong, ulong);
byte1 = getOffset (a1, a2);
byte2 = getOtherOffset (b1, b2);
_Instead_of the above, to shorten it all, it did NOT work here to say
if ( (byte1 = getOffset (a1,a2)) != (byte2 = getOtherOffset(b1,b2)))
{
....
}
It was supposed to have both byte1 and byte2 calculated separately, then
compared.
No errors whatsoever when compiling; however, this always gave a wrong
(resp. random) result for byte1 when debugging, why?
However, calculating the left result isolatedly, this *does* work:
byte1 = getOffset (a1,a2);
if ( (byte1 != (byte2 = getOtherOffset(b1,b2)))
{
....
}
Is this a known "issue"? (note the quotes)
-Andreas
supposed I have this alone:
(mentally add typedefs )
uchar byte1, byte2;
ulong a1, a2, b1, b2;
uchar getOffset (ulong, ulong);
uchar getOtherOffset (ulong, ulong);
byte1 = getOffset (a1, a2);
byte2 = getOtherOffset (b1, b2);
_Instead_of the above, to shorten it all, it did NOT work here to say
if ( (byte1 = getOffset (a1,a2)) != (byte2 = getOtherOffset(b1,b2)))
{
....
}
It was supposed to have both byte1 and byte2 calculated separately, then
compared.
No errors whatsoever when compiling; however, this always gave a wrong
(resp. random) result for byte1 when debugging, why?
However, calculating the left result isolatedly, this *does* work:
byte1 = getOffset (a1,a2);
if ( (byte1 != (byte2 = getOtherOffset(b1,b2)))
{
....
}
Is this a known "issue"? (note the quotes)
-Andreas