Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

8. Compiler Directives

Chapter 8. Compiler Directives

Compiler directives are special comments that control the compiler and its behavior, similar to #pragma directives in C++. This chapter discusses compiler directives and lists all the compiler directives Delphi supports.

A directive comment is one whose first character is a dollar sign ($). You can use either kind of Pascal-style comment:

{$AppType GUI}
(*$AppType GUI*)

You cannot use a C++ style comment (//$Apptype) for a compiler directive.

If the first character of a comment is not a dollar sign, the comment is not a compiler directive. A common trick to deactivate or “comment out” a compiler directive is to insert a space or other character just before the dollar sign, for example:


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint