[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Intro                    Explanation of Compiler Directives

    The Turbo Pascal compiler can be controlled by means of compiler
    directives. Compiler directives enable or disable a feature of the
    Turbo Pascal Compiler.

    A compiler directive is identified by an opening comment brace ({),
    followed immediately by a dollar sign ($), and then followed
    immediately by a directive letter or a list of compiler directive
    letters separated by commas. For most of the directives, the letter is
    followed by either a plus (+) or minus (-) sign, indicating that the
    directive is enabled (active) or disabled (passive), respectively. In
    a few cases, the directive letter is followed by a value or a text
    string. Lastly, a closing comment brace (}) must terminate the
    directive definition.

    Some directives are global in scope, which means they only need to be
    placed at the beginning of a program to affect the entire program.
    Other directives act as toggles. They will turn a feature on and off
    as they are encountered.

    All the compiler directives have default states. The default states
    have been selected to create programs with optimal execution speed and
    minimal code size.

    When first testing a program, many of these directives should have
    their states changed so that programming errors can be found easier.

  -------------------------------- Example ---------------------------------

           {$R+}                    { Turn on run-time index checking }
           {$I GRAPH.P}             { Include the file 'GRAPH.P' }
           {$R+,I+}                 { Turn on run-time index checking and }
                                    {   also turn on I/O error handling }

See Also:
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson