1. Home
  2. Computing & Technology
  3. Delphi Programming

How to comment out large amount of source code

By , About.com Guide

To comment a simple line of code you could use // before that line. To comment few lines you could use { } or (* *). But, if you have a large amount of code that you want to comment out, none of the above operators may help, depending on whether you have already used those operators in the code. Here's a definitive way to comment out code:

{$IFDEF False}

your commented
code goes here

{$ENDIF}

Delphi tips navigator:
» How to delete 'Temporary Internet Files' from code
« How to place a TCheckBox inside a TRichEdit

Explore Delphi Programming
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming
  4. Coding Delphi Applications
  5. Delphi Tips and Tricks
  6. 2002 Delphi Tips
  7. How to comment out large amount of source code

©2009 About.com, a part of The New York Times Company.

All rights reserved.