[Home]  [Edit this page]  [Recent Changes]  [Special Pages]  [Help
CWarning

(C) Warning

When the compiler detects 'something strange' (but is able to compile) it will emit a warning, instead of an  ?error. These warnings, however, often indicate unexpected behaviour (for the programmer, that is). It is a good idea to correct the warning.

/* detected in comment

Caused by a nested comment.

/* 
  COMMENT 1 
  /* 
    NESTED COMMENT 2 
      • /
  • /


It depends on your compiler if this is a serious problem, instead of 'just sloppy'. But if your compiler supports only 80 characters per line, this might indicate a serious error:

/* A naive programmer's code on an 80 characters */
/* per line supporting compiler                  */
/* Some long comment of muuuuuuuuuuuuuuch more then eight characters long */
someFunction();
/* A short comment */


This will be transformed to:

/* A naive programmer's code on an 80 characters */
/* per line supporting compiler                  */
/* Some long comment of muuuuuuuuu
someFunction();
/* A short comment */


which makes someFunction() comment as well!



last edited (November 24, 2006) by bilderbikkel, Number of views: 1197, Current Rev: 2 (Diff)

[Edit this page]  [Page history]  [What links here]  [Discuss this topic]  [Printer Friendly]  

Members

Username:

Password:


Register
Forgot Password?




Programmers Heaven - for .NET, Java, C/C++ and WEB Developers!
© 1996-2008 Community Networks Ltd. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited. Violators of this policy may be subject to legal action. Please read Terms Of Use and Privacy Statement for more information. Development by Tore Nestenius at .NET Consultant - Synchron Data.