![]() |
![]() |
2000 | ![]() |
||||
![]() | |||||||
| Control flow | |||||||
No else clause has been encountered in this if statement. This style is not recommended in some programming standards. An else is considered important in the interests of logical completeness. Note that message 2004 is generated instead for an if ... else if construct, when the final else clause is missing. For example:
/*PRQA S 1-9999 ++*/
/*PRQA S 2000, 2004 --*/
extern void f2000 (int n)
{
if (n < 10) /* 2000 */
{
/* ... */
}
if (n < 10)
{
/* ... */
}
else if (n < 20) /* 2004 */
{
/* ... */
}
}
See also:
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |