B
Brian
I am using Borland C++ Builder 5 for my application. When I build my
application, it states that I have several if-statements that will
always be false. The statements appear correct, so could someone
please enlighten me as to how C++ Builder may think that the
conditions will always be false. See below. Thanks.
<snip>
td.expMon = trk2[9] * 10 + trk2[10];
// Borland says this is always false, though the condition is
fine.
if ((td.expMon < 0) || (td.expMon > 12)) {
err = TKT_INVALID_MONTH;
}
</snip>
<snip>
td.expDay = trk2[11] * 10 + trk2[12];
// Borland says this is always false, though the condition is
fine.
if ((td.expDay < 0) || (td.expDay > 31)) {
err = TKT_INVALID_DAY;
}
</snip>
<snip>
td.eftvDay = trk2[28] * 10 + trk2[29];
// Borland says this is always false, though the condition is
fine.
if ((td.eftvDay < 0) || (td.eftvDay > 31)) {
err = TKT_INVALID_DAY;
}
</snip>
application, it states that I have several if-statements that will
always be false. The statements appear correct, so could someone
please enlighten me as to how C++ Builder may think that the
conditions will always be false. See below. Thanks.
<snip>
td.expMon = trk2[9] * 10 + trk2[10];
// Borland says this is always false, though the condition is
fine.
if ((td.expMon < 0) || (td.expMon > 12)) {
err = TKT_INVALID_MONTH;
}
</snip>
<snip>
td.expDay = trk2[11] * 10 + trk2[12];
// Borland says this is always false, though the condition is
fine.
if ((td.expDay < 0) || (td.expDay > 31)) {
err = TKT_INVALID_DAY;
}
</snip>
<snip>
td.eftvDay = trk2[28] * 10 + trk2[29];
// Borland says this is always false, though the condition is
fine.
if ((td.eftvDay < 0) || (td.eftvDay > 31)) {
err = TKT_INVALID_DAY;
}
</snip>