Compilation
In addition to a specialized text editor, PowerBASIC for Windows ships with a compiler that converts the PowerBASIC source code into an EXE or a DLL. The compiler is a separate program but is called from within the text editor.

Within an application's source code, a programmer can place special directions for the compiler, called directives. Directives are standalone lines of text, preceded with a pound sign (#) as shown in the following examples. Directives are read by the compiler but are generally not compiled into the resulting EXE or DLL files.

The compiler directive options can be broken roughly into the following categories.

Most Used Compiler Directives
Application source code may contain special directions for the compiler, called directives. Directives are standalone line of text, preceded with a pound sign (#) as shown in in the following examples. Directives are read by the compiler, acted on, and then ignored. They are not compiled as part of the resulting EXE or DLL files.

    #compile exe                - create EXE
    #compile dll                - create DLL
    #dim all                    - delcare all variables before use
    #include "extracode.bas"    - insert code from file "extracode.bas"

Of the 21 compiler directives, these four are perhaps the most common, and at least one will be used in every program you write.

Compiler Directive Listing
Here's a complete list of the 21 compiler directives recognized by PowerBASIC. Except for the four directives listed above, most of these are used only when a programmer has a specific need or issue to resolve - very useful when needed, just not needed all that often.

Most of these allow the inclusion of one or more arguments which tailor how the directive works. See the PowerBASIC help file for additional details.

Compiler Directives Reference
This section goes beyond the one line description above, giving additional information on using the compiler directives.

If you have any suggestions or corrections, please let me know.