carbidecpp22devenv/configuration/org.eclipse.osgi/bundles/309/1/.cp/tasks/cdt_t_comment_out.htm
author cawthron
Fri, 04 Dec 2009 10:01:33 -0600
changeset 5 684bf18fdedf
permissions -rw-r--r--
add files for RCL_2_2
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
     1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
     2
<html lang="en">
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
     3
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
     4
<head>
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
     5
<meta http-equiv="Content-Language" content="en-us">
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
     6
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
     7
<title>Commenting out code</title>
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
     8
<link rel="stylesheet" type="text/css" href="../help.css">
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
     9
</head>
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    10
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    11
<body>
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    12
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    13
<h1>Commenting out code</h1>
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    14
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    15
<p>You can comment out one or more lines of code. The leading characters <samp>//</samp> 
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    16
are added to the beginning of each line.</p>
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    17
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    18
<p><b>Tip:</b> The characters <samp>/* */</samp> on lines that already are 
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    19
already commented out are not affected when you comment and uncomment code as 
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    20
described above.</p>
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    21
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    22
<p>To comment out code:</p>
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    23
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    24
<ol>
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    25
  <li>In the C/C++ editor, select the line(s) of code that you want to comment out.  If no lines are selected comments will be added (or removed) at the current cursor positition.</li>
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    26
  <li>Right-click and do one of the following:</li>
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    27
  <ul>
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    28
  <li>To comment out the selected code, select <b>Comment</b>.</li>
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    29
  <li>To remove the leading <samp>//</samp> characters from the selected 
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    30
  line(s) of code, select <b>Uncomment</b>.</li>
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    31
  </ul>
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    32
</ol>
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    33
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    34
<b>Tip: </b>Instead of using the context menu (right click) you can quickly comment out by pressing CTRL+/ or remove comments by pressing CTRL+\.
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    35
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    36
 <p><img border="0" src="../images/ngconcepts.gif" ALT="Related concepts" width="143" height="21">
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    37
<br>
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    38
 <a href="../concepts/cdt_o_code_entry.htm">Code entry</a></p>
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    39
<p><img border="0" src="../images/ngtasks.gif" ALT="Related tasks" width="143" height="21">
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    40
<br>
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    41
<a href="cdt_t_cust_cpp_editor.htm">Customizing the C/C++ editor</a><br>
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    42
<a href="cdt_o_con_assist.htm">Working with Content Assist</a></p>
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    43
<p><img border="0" src="../images/ngref.gif" ALT="Related reference" width="143" height="21">
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    44
<br>
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    45
<a href="../reference/cdt_o_ceditor_pref.htm">C/C++ editor preferences</a></p>
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    46
<img src="../images/ng00_04a.gif" ALT="IBM Copyright Statement" >
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    47
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    48
</body>
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    49
684bf18fdedf add files for RCL_2_2
cawthron
parents:
diff changeset
    50
</html>