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
  • PrintPrint
Share this Page URL
Help

5. The Language, Part 1: Nouns > Defining Global Directives

Defining Global Directives

Two constants are used by convention during development: DEBUG is used to control output, usually to perform additional checks or display more detailed information than would be required in a released application, and TRACE is typically used to include code that outputs information about the state of the application at a given point in time. Visual Basic provides a simple way to define these constants on a project-wide basis via the Advanced Compile Settings dialog that is displayed when you click the Advanced Compile Options button on the Compile tab of the Solution Properties dialog:

image

On Your Own

image

Check that the DEBUG constant is defined in the Solution Properties dialog, and then change the #if directive to read simply #if DEBUG. Does the application still work as expected?


  

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
  • PrintPrint