diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2008-01-27 11:37:44 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@xenon.tklauser.home> | 2008-01-27 11:37:44 +0100 |
commit | 7e0f021a9aec35fd8e6725e87e3313b101d26f5e (patch) | |
tree | b1cacc4b24393f517aeb4610e9e1021f954307a8 /reference/C/SYNTAX/comments.html |
Initial import (2.0.2-6)2.0.2-6
Diffstat (limited to 'reference/C/SYNTAX/comments.html')
-rw-r--r-- | reference/C/SYNTAX/comments.html | 111 |
1 files changed, 111 insertions, 0 deletions
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 @@ +<head> +<title>Comments.</title> +<script language="JavaScript"> +</script> +</head> + +<body bgcolor="#ffffcc"> +<hr> +<center> +<h1>Comments.</h1> +</center> +<hr> +<p> +Lets start with a few examples. +<p> +<center> +<table border=2 width="80%" bgcolor=ivory> +<tr> +<td> +<pre> + + main() + { + + int Counter=0; /* Initalise Counter */ + + /* a comment */ + + /* + * Another comment + */ + + /***************** + * + * Final comment. + * + *****************/ + } +</pre> +</td> +</tr> +</table> +</center> +<p> +<hr> +<p> +A comment starts with a <b>/*</b> and +ends with <b>*/</b>. Comments started in this way can span multiple +lines but cannot be nested. +For example: +<p> +<center> +<table border=2 width="80%" bgcolor=ivory> +<tr> +<td> +<pre> + + main() + { + int Count = 0; /* Initalise + * Counter to 0 */ + + /* /* Invalid comment */ */ + } +</pre> +</td> +</tr> +</table> +</center> +<p> +This will give a syntax error, because the last line +contains nested comments. +<font color=brown> +C++ offers a solution to +<a href="../../CPLUSPLUS/SYNTAX/comment.html">comment nesting.</a> + +<p> +<a name="c++"> +<hr> +<font color=brown> +<h2>C++ Extension</h3> +<img src="../../GRAPHICS/whiteball.gif"> +<a href="../../CPLUSPLUS/SYNTAX/comment.html">Inline comments</a> +</font> +<p> + +<p> + +<hr> +<p> +<center> +<table border=2 width="80%" bgcolor="ivory"> +<tr align=center> +<td width="25%"> +<a href="../cref.html"> Top</a> +</td><td width="25%"> +<a href="../master_index.html"> Master Index</a> +</td><td width="25%"> +<a href="keywords.html"> Keywords</a> +</td><td width="25%"> +<a href="../FUNCTIONS/funcref.htm"> Functions</a> +</td> +</tr> +</table> +</center> +<p> +<hr> +<address>Martin Leslie +</address><p> +</body> +</html> |