- #1
Paul Uszak
- 84
- 7
This is a very basic question, but one that's vexed me for a while. Are these two fragments equal:-In C, with c and t as integers
c = t < 0
and in Java, also with integers
if (t < 0) {
c = -1;
} else {
c = 0;
}
Reason I ask is that my Java interpretation works with any combination of t & c, and I can't tell which is the correct translation...
c = t < 0
and in Java, also with integers
if (t < 0) {
c = -1;
} else {
c = 0;
}
Reason I ask is that my Java interpretation works with any combination of t & c, and I can't tell which is the correct translation...