Echelon NodeBuilder Errors 3120 User Manual Page 54

  • Download
  • Add to my manuals
  • Print
  • Page
    / 123
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 53
5-34 Neuron C Compiler Errors (NCC)
NCC# Description
248
Comparison is ineffective - result of comparison is a constant
[NCC#248]
A conditional expression (comparison) which involves a constant
value that is out of the range of a variable value is an ineffective
comparison; one that always resolves to either the constant TRUE or
the constant FALSE. The Neuron C compiler detects such a
condition and issues a warning assuming that the comparison might
be erroneous. This situation most commonly occurs when an
unsigned short is compared with a negative number, or a short is
compared with a constant that is a long. Recall that Neuron C
defines short to be 8 bits and long to be 16 bits.
void f(void) {
int i;
if (i < 300) {
// The comparison shown above is an
// ineffective comparison, since 'i'
// can only be in the range -128..127.
// The constant 300 is a long. This
// is most likely a programming error.
}
}
249
250
Loop, branch, or ‘when’ condition is always TRUE [NCC#249]
Loop, branch, or ‘when’ condition is always FALSE [NCC#250
The Neuron C compiler detects when some conditions are always
FALSE or always TRUE. This warning is generated to help
programmers ensure that their program is correct. A condition that
is always FALSE, or TRUE, may result from an erroneous
conditional expression.
Page view 53
1 2 ... 49 50 51 52 53 54 55 56 57 58 59 ... 122 123

Comments to this Manuals

No comments