carbidecpp22devenv/configuration/org.eclipse.osgi/bundles/309/1/.cp/tasks/cdt_t_comment_out.htm
changeset 5 684bf18fdedf
equal deleted inserted replaced
4:4764c8c88759 5:684bf18fdedf
       
     1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
       
     2 <html lang="en">
       
     3 
       
     4 <head>
       
     5 <meta http-equiv="Content-Language" content="en-us">
       
     6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
       
     7 <title>Commenting out code</title>
       
     8 <link rel="stylesheet" type="text/css" href="../help.css">
       
     9 </head>
       
    10 
       
    11 <body>
       
    12 
       
    13 <h1>Commenting out code</h1>
       
    14 
       
    15 <p>You can comment out one or more lines of code. The leading characters <samp>//</samp> 
       
    16 are added to the beginning of each line.</p>
       
    17 
       
    18 <p><b>Tip:</b> The characters <samp>/* */</samp> on lines that already are 
       
    19 already commented out are not affected when you comment and uncomment code as 
       
    20 described above.</p>
       
    21 
       
    22 <p>To comment out code:</p>
       
    23 
       
    24 <ol>
       
    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>
       
    26   <li>Right-click and do one of the following:</li>
       
    27   <ul>
       
    28   <li>To comment out the selected code, select <b>Comment</b>.</li>
       
    29   <li>To remove the leading <samp>//</samp> characters from the selected 
       
    30   line(s) of code, select <b>Uncomment</b>.</li>
       
    31   </ul>
       
    32 </ol>
       
    33 
       
    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+\.
       
    35 
       
    36  <p><img border="0" src="../images/ngconcepts.gif" ALT="Related concepts" width="143" height="21">
       
    37 <br>
       
    38  <a href="../concepts/cdt_o_code_entry.htm">Code entry</a></p>
       
    39 <p><img border="0" src="../images/ngtasks.gif" ALT="Related tasks" width="143" height="21">
       
    40 <br>
       
    41 <a href="cdt_t_cust_cpp_editor.htm">Customizing the C/C++ editor</a><br>
       
    42 <a href="cdt_o_con_assist.htm">Working with Content Assist</a></p>
       
    43 <p><img border="0" src="../images/ngref.gif" ALT="Related reference" width="143" height="21">
       
    44 <br>
       
    45 <a href="../reference/cdt_o_ceditor_pref.htm">C/C++ editor preferences</a></p>
       
    46 <img src="../images/ng00_04a.gif" ALT="IBM Copyright Statement" >
       
    47 
       
    48 </body>
       
    49 
       
    50 </html>