Contents | Prev | Next

5.1.2.1 Compiler options overview

Compiler options are instructions to the compiler to somehow modify its behavior (usually they are instructions to enable or disable a particular compiler feature). Compiler options are entered on the command-line when you invoke the command-line compiler. NOTE: Compile options are case-sensitive so for example i and I are different compiler options.

There are two kinds of compiler options

  1. Flag options
  2. Value options

Flag Options

Flag options are used to enable or disable a compiler feature.

To enable the feature use

   -option    or   -option+

where option is the particular compiler option.

To disable the feature use

   -option-

For example the nc option is used to enable/disable the processing of nested comments. So -nc or -nc+ is used to enable the processing of nested comments and -nc- is used to disable the processing of nested comments.

Value options are used to specify the value of some quantity.

To specify a value option use

   -optionVALUE

where option is the particular compiler option and VALUE is the value being specified.

For example the mw option is used to specify the maximum number of warnings that the compiler should process. So -mw2 is used to set the maximum number of warnings to 2.

More than one option can be specified so for example, if you want to compile the program bad.pas using brief messages and nested comments then you can enter

   ipc -b -nc bad.pas

Options can be combined so you can also enter

   ipc -bnc bad

or

   ipc -ncb bad

To turn off nested comment processing and brief message then you can enter

   ipc -nc- -b- bad

or

   ipc -ncb- bad

Options List

The command-line compiler options are listed below:

Contents | Prev | Next