From 7e0f021a9aec35fd8e6725e87e3313b101d26f5e Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 27 Jan 2008 11:37:44 +0100 Subject: Initial import (2.0.2-6) --- reference/C/SYNTAX/comments.html | 111 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 reference/C/SYNTAX/comments.html (limited to 'reference/C/SYNTAX/comments.html') diff --git a/reference/C/SYNTAX/comments.html b/reference/C/SYNTAX/comments.html new file mode 100644 index 0000000..d3ff791 --- /dev/null +++ b/reference/C/SYNTAX/comments.html @@ -0,0 +1,111 @@ + +Comments. + + + + +
+
+

Comments.

+
+
+

+Lets start with a few examples. +

+

+ + + + +
+
+
+  main()
+  {
+
+      int Counter=0;       /* Initalise Counter */
+
+      /* a comment */
+
+      /*
+       * Another comment
+       */
+
+      /*****************
+       *
+       * Final comment.
+       *
+       *****************/ 
+  }
+
+
+
+

+


+

+A comment starts with a /* and +ends with */. Comments started in this way can span multiple +lines but cannot be nested. +For example: +

+

+ + + + +
+
+
+   main()
+   {
+       int Count = 0;           /* Initalise 
+                                 * Counter to 0 */
+
+       /* /* Invalid comment */ */
+   }
+
+
+
+

+This will give a syntax error, because the last line +contains nested comments. + +C++ offers a solution to +comment nesting. + +

+ +


+ +

C++ Extension

+ +
Inline comments + +

+ +

+ +


+

+

+ + + + +
+ Top + + Master Index + + Keywords + + Functions +
+
+

+


+
Martin Leslie +

+ + -- cgit v1.2.3-54-g00ecf lect name='qt'>

ModeNameSize