summaryrefslogtreecommitdiff
path: root/reference/CPLUSPLUS/SYNTAX/comment.html
blob: b085c907941a366147508a8dc04c76e98a359e82 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<head>
<title>C++ Comments.</title>
</head>
<body bgcolor=#dddddd>
<font color=brown>
<hr>
<center>
<h1>C++ Comments.</h1>
</center>
<hr>
<p>
C++ allows <b>//</b> as an inline comment, it can be used on any line and is
delimited by the newline character (return).
<p>
<center>
<table border=2 width="80%" bgcolor="ivory">  
<tr>
<td>
<pre>

  main()
  {
      int Counter = 0;       // Initalise Counter.

      /* Start the main processing here. */
  }

</pre>
</td>
</tr>
</table>
</center>
<p>
A handy feature of the new comments is the ability to nest them within the
old style comments.
<p>
This provides a handy debugging tool. If you write your normal comments 
using the <b>//</b> syntax, you can then comment out blocks of code while 
debugging with <b> /* */</b>

</font>
<font color=black>
<hr>
<h2>C comments</h3>
<img src="../../GRAPHICS/whiteball.gif">
<a href="../../C/SYNTAX/comments.html">/* ... */ comments</a>
<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="../../C/master_index.html">Master Index</a>
</td><td width="25%">
<a href="keywords.html">C++ Keywords</a>
</td><td width="25%">
<a href="../../C/FUNCTIONS/funcref.htm">Functions</a>
</td>
</tr>
</table>
</center>
<p>


<hr>
<font color=brown>
<address>Martin Leslie
30-Jan-96</address>
</font>