Free Pascal supports compiler directives in your source file. They are not the same as Turbo Pascal directives, although some are supported for compatibility. There is a distinction between local and global directives; local directives take effect from the moment they are encountered, global directives have an effect on all of the compiled code.
Many switches have a long form also. If they do, then the name of the long form is given also. For long switches, the + or - character to switch the option on or off, may be replaced by ON or OFF keywords.
Thus {$I+}
is equivalent to {$IOCHECKS ON}
or
{$IOCHECKS +}
and
{$C-}
is equivalent to {$ASSERTIONS OFF}
or
{$ASSERTIONS -}
The long forms of the switches are the same as their Delphi counterparts.
This switch is recognized for Turbo Pascal Compatibility, but is not yet implemented. The alignment of data will be different in any case, since Free Pascal is a 32-bit compiler.
The {$ASMMODE XXX} directive informs the compiler what kind of assembler it can expect in an asm block. The XXX should be replaced by one of the following:
The default assembler reader is the AT&T reader.
This switch is understood by the Free Pascal compiler, but is ignored. The compiler always uses shortcut evaluation, i.e. the evaluation of a boolean expression is stopped once the result of the total exression is known with certainty.
So, in the following example, the function Bofu, which has a boolean result, will never get called.
If False and Bofu then ...This has as a consequence that any additional actions that are done by Bofu are not executed.
The {$ASSERTION} switch determines if assert statements are compiled into the binary or not. If the switch is on, the statement
Assert(BooleanExpression,AssertMessage);Will be compiled in the binary. If te BooleanExpression evaluates to False, the RTL will check if the AssertErrorProc is set. If it is set, it will be called with as parameters the AssertMessage message, the name of the file, the LineNumber and the address. If it is not set, a runtime error 227 is generated.
The AssertErrorProc is defined as
Type TAssertErrorProc=procedure(const msg,fname:string;lineno,erroraddr:longint); Var AssertErrorProc = TAssertErrorProc;This can be used mainly for debugging purposes. The SYSTEM unit sets the AssertErrorProc to a handler that displays a message on stderr and simply exits. The SYSUTILS unit catches the run-time error 227 and raises an EAssertionFailed exception.
The directive
{$DEFINE name}defines the symbol name. This symbol remains defined until the end of the current module (i.e. unit or program), or until a $UNDEF name directive is encountered.
If name is already defined, this has no effect. Name is case insensitive.
The symbols that are defined in a unit, are not saved in the unit file, so they are also not exported from a unit.
The {$ELSE } switches between compiling and ignoring the source text delimited by the preceding {$IFxxx} and following {$ENDIF}. Any text after the ELSE keyword but before the brace is ignored:
{$ELSE some ignored text}is the same as
{$ELSE}This is useful for indication what switch is meant.
The {$ENDIF} directive ends the conditional compilation initiated by the last {$IFxxx} directive. Any text after the ENDIF keyword but before the closing brace is ignored:
{$ENDIF some ignored text}is the same as
{$ENDIF}This is useful for indication what switch is meant to be ended.
The following code
{$ERROR This code is erroneous !}will display an error message when the compiler encounters it, and increase the error count of the compiler. The compiler will continue to compile, but no code will be emitted.
As an example, the following piece of code :
{$F+} Procedure TestProc; begin Writeln ('Hello From TestProc'); end; begin testProc end.Generates the following compiler output:
malpertuus: >pp -vw testf Compiler: ppc386 Units are searched in: /home/michael;/usr/bin/;/usr/lib/ppc/0.9.1/linuxunits Target OS: Linux Compiling testf.pp testf.pp(1) Warning: illegal compiler switch 7739 kB free Calling assembler... Assembled... Calling linker... 12 lines compiled, 1.00000000000000E+0000You can see that the verbosity level was set to display warnings.
If you declare a function as Far (this has the same effect as setting it between {$F+}...{$F-} directives), the compiler also generates a warning :
testf.pp(3) Warning: FAR ignored
The same story is true for procedures declared as Near. The warning displayed in that case is:
testf.pp(3) Warning: NEAR ignored
The following code
{$FATAL This code is erroneous !}will display an error message when the compiler encounters it, and the compiler will immediatly stop the compilation process.
This is mainly useful inc conjunction wih {$IFDEF } or {$IFOPT } statements.
If {$GOTO ON} is specified, the compiler will support Goto statements and Label declarations. By default, $GOTO OFF is assumed. This directive corresponds to the -Sg command-line option.
As an example, the following code can be compiled:
{$GOTO ON} label Theend; begin If ParamCount=0 then GoTo TheEnd; Writeln ('You specified command-line options'); TheEnd: end.
Remark: If you compile assembler code not in direct mode (using the intel or assembler readers) you must declare any labels you use in the assembler code and use {$GOTO ON}. If you compile in Direct mode then this is not necessary.
If {$LONGSTRINGS ON} is specified, the keyword String (no length specifier) will be treated as AnsiString, and the compiler will treat the corresponding varible as an ansistring, and will generate corresponding code.
By default, the use of ansistrings is off, corresponding to {$H-}. The system unit is compiled without ansistrings, all its functions accept shortstrng arguments. The same is true for all RTL units, except the sysutils unit, which is compiled with ansistrings.
If the generation of hints is turned on, through the -vh command-line option or the {$HINTS ON} directive, then
{$Hint This code should be optimized }will display a hint message when the compiler encounters it.
By default, no hints are generated.
{$HINTS ON} switches the generation of hints on. {$HINTS OFF} switches the generation of hints off. Contrary to the command-line option -vh this is a local switch, this is useful for checking parts of your code.
The directive {$IF expr} will continue the compilation if the boolean expression expr evaluates to true. If the compilation evaluates to false, then the source is skipped to the first {$ELSE} or {$ENDIF} directive.
The compiler must be able to evaluate the expression at parse time. This means that you cannot use variables or constants that are defined in the source. Macros and symbols may be used, however.
More information on this can be found in the section about conditionals.
If the symbol Name is not defined then the {$IFDEF name} will skip the compilation of the text that follows it to the first {$ELSE} or {$ENDIF} directive. If Name is defined, then compilation continues as if the directive wasn't there.
If the symbol Name is defined then the {$IFNDEF name} will skip the compilation of the text that follows it to the first {$ELSE} or {$ENDIF} directive. If it is not defined, then compilation continues as if the directive wasn't there.
The {$IFOPT switch} will compile the text that follows it if the switch switch is currently in the specified state. If it isn't in the specified state, then compilation continues after the corresponding {$ELSE} or {$ENDIF} directive.
As an example:
{$IFOPT M+} Writeln ('Compiled with type information'); {$ENDIF}Will compile the writeln statement if generation of type information is on.
Remark: The {$IFOPT} directive accepts only short options, i.e. {$IFOPT TYPEINFO} will not be accepted.
If the generation of info is turned on, through the -vi command-line option, then
{$INFO This was coded on a rainy day by Bugs Bunny }will display an info message when the compiler encounters it.
This is useful in conjunction with the {$IFDEF} directive, to show information about which part of the code is being compiled.
By default, Inline procedures are not allowed. You need to specify this directive if you want to use inlined code. This directive is equivalent to the command-line switch -Si.
Remark:
If you compile using the -Ci compiler switch, the Free Pascal compiler inserts input/output checking code after every input/output call in your program. If an error occurred during input or output, then a run-time error will be generated. Use this switch if you wish to avoid this behavior. If you still want to check if something went wrong, you can use the IOResult function to see if everything went without problems.
Conversely, {$I+} will turn error-checking back on, until another directive is encountered which turns it off again.
The most common use for this switch is to check if the opening of a file went without problems, as in the following piece of code:
... assign (f,'file.txt'); {$I-} rewrite (f); {$I+} if IOResult<>0 then begin Writeln ('Error opening file : "file.txt"'); exit end; ...See the IOResult function explanantion in the referece manual for a detailed description of the possible errors that can occur when using input/output checking.
The compiler will append the .pp extension to the file if you don't specify an extension yourself. Do not put the filename between quotes, as they will be regarded as part of the file's name.
You can nest included files, but not infinitely deep. The number of files is restricted to the number of file descriptors available to the Free Pascal compiler.
Contrary to Turbo Pascal, include files can cross blocks. I.e. you can start a block in one file (with a Begin keyword) and end it in another (with a End keyword). The smallest entity in an include file must be a token, i.e. an identifier, keyword or operator.
The compiler will look for the file to include in the following places:
In this form:
{$INCLUDE %xxx%}where xxx is one of TIME, DATE, FPCVERSION or FPCTARGET, will generate a macro with the value of these things. If xxx is none of the above, then it is assumed to be the value of an environment variable. It's value will be fetched, and inserted in the code as if it were a string.
For example, the following program
Program InfoDemo; Const User = {$I %USER%}; begin Write ('This program was compiled at ',{$I %TIME%}); Writeln (' on ',{$I %DATE%}); Writeln ('By ',User); Writeln ('Compiler version : ',{$I %FPCVERSION%}); Writeln ('Target CPU : ',{$I %FPCTARGET%}); end.Creates the following output :
This program was compiled at 17:40:18 on 1998/09/09 By michael Compiler version : 0.99.7 Target CPU : i386
This switch selects the assembler reader. {$I386_XXX} has the same effect as {$ASMMODE XXX}, section AsmReader
This switch is deprecated, the {$ASMMODE XXX} directive should be used instead.
The compiler will look for this file in the following way:
On LINUX systems, the name is case sensitive, and must be typed exactly as it appears on your system.
Remark: Take care that the object file you're linking is in a format the linker understands. Which format this is, depends on the platform you're on. Typing ld on the command line gives a list of formats ld knows about.
You can pass other files and options to the linker using the -k command-line option. You can specify more than one of these options, and they will be passed to the linker, in the order that you specified them on the command line, just before the names of the object files that must be linked.
The {$LINKLIB name} will link to a library name. This has the effect of passing -lname to the linker.
As an example, consider the following unit:
unit getlen; interface {$LINKLIB c} function strlen (P : pchar) : longint;cdecl; implementation function strlen (P : pchar) : longint;cdecl;external; end.If one would issue the command
ppc386 foo.ppwhere foo.pp has the above unit in its uses clause, then the compiler would link your program to the c library, by passing the linker the -lc option.
The same effect could be obtained by removing the linklib directive in the above unit, and specify -k-lc on the command-line:
ppc386 -k-lc foo.pp
For classes that are compiled in the {$M+ } or {$TYPEINFO ON} state, the compiler will generate Run-Time Type Information (RTTI). All descendent objects of an object that was compiled in the {$M+} state will get RTTI information too, as well as any published classes. By default, no Run-Time Type Information is generated. The TPersistent object that is present in the FCL (Free Component Library) is generated in the {$M+} state. The generation of RTTI allows programmers to stream objects, and to access published properties of objects, without knowing the actual class of the object.
The run-time type information is accessible through the TypInfo unit, which is part of the Free Pascal Run-Time Library.
Remark: that the streaming system implemented by Free Pascal requires that you make streamable components descendent from TPersistent.
In the {$MACRO ON} state, the compiler allows you to use C-style (although not as elaborate) macros. Macros provide a means for simple text substitution. More information on using macros can be found in the section Macros section. This directive is equivalent to the command-line switch -Sm.
By default, macros are not allowed.
The {$MAXFPUREGISTERS XXX} directive tells the compiler how much floating point variables can be kept in the floating point processor registers. This switch is ignored unless the -Or (use register variables) optimization is used.
Since version 0.99.14, the Free Pascal compiler supports floating point register variables; the content of these variables is not stored on the stack, but is kept in the floating point processor stack.
This is quite tricky because the Intel FPU stack is limited to 8 entries. The compiler uses a heuristic algorithm to determine how much variables should be put onto the stack: in leaf procedures it is limited to 3 and in non leaf procedures to 1. But in case of a deep call tree or, even worse, a recursive procedure this can still lead to a FPU stack overflow, so the user can tell the compiler how much (floating point) variables should be kept in registers.
The directive accepts the following arguments:
Remark: The directive is valid untill the end of the current procedure.
If the generation of info is turned on, through the -vi command-line option, then
{$MESSAGE This was coded on a rainy day by Bugs Bunny }will display an info message when the compiler encounters it. The effect is the same as the {$INFO} directive.
This optimizes certain code parts for the MMX Intel processor, thus greatly improving speed. The speed is noticed mostly when moving large amounts of data. Things that change are
Remark: MMX support is NOT emulated on non-MMX systems, i.e. if the processor doesn't have the MMX extensions, you cannot use the MMX optimizations.
When MMX support is on, you aren't allowed to do floating point arithmetic. You are allowed to move floating point data, but no arithmetic can be done. If you wish to do floating point math anyway, you must first switch of MMX support and clear the FPU using the emms function of the cpu unit.
The following example will make this more clear:
Program MMXDemo; uses cpu; var d1 : double; a : array[0..10000] of double; i : longint; begin d1:=1.0; {$mmx+} { floating point data is used, but we do _no_ arithmetic } for i:=0 to 10000 do a[i]:=d2; { this is done with 64 bit moves } {$mmx-} emms; { clear fpu } { now we can do floating point arithmetic } .... end.See, however, the chapter on MMX () for more information on this topic.
If the generation of notes is turned on, through the -vn command-line option or the {$NOTES ON} directive, then
{$NOTE Ask Santa Claus to look at this code }will display a note message when the compiler encounters it.
{$NOTES ON} switches the generation of notes on. {$NOTES OFF} switches the generation of notes off. Contrary to the command-line option -vn this is a local switch, this is useful for checking parts of your code.
By default, {$NOTES } is off.
The default output format depends on the platform the compiler was compiled on.
Switch value | Generated format |
AS | AT&T assembler file. |
AS_AOUT | Go32v1 assembler file. |
ASW | AT&T Win32 assembler file. |
COFF | Go32v2 COFF object file. |
MASM | Masm assembler file. |
NASM | Nasm assembler file. |
NASMCOFF | Nasm assembler file (COFF format). |
NASMELF | Nasm assembler file (ELF format). |
PECOFF | PECOFF object file (Win32). |
TASM | Tasm assembler file. |
If this switch is on, all function or procedure parameters of type string are considered to be open string parameters; this parameter only has effect for short strings, not for ansistrings.
When using openstrings, the declared type of the string can be different from the type of string that is actually passed, even for strings that are passed by reference. The declared size of the string passed can be examined with the High(P) call.
Default the use of openstrings is off.
This directive tells the compiler the minimum number of bytes it should use when storing enumerated types. It is of the following form:
{$PACKENUM xxx} {$MINENUMSIZE xxx}Where the form with $MINENUMSIZE is for Delphi compatibility. xxx can be one of 1,2 or 4, or NORMAL or DEFAULT, corresponding to the default value of 4.
As an alternative form one can use {$Z1}, {$Z2} {$Z4}. Contrary to Delphi, the default size is 4 bytes ({$Z4}).
So the following code
{$PACKENUM 1} Type Days = (monday, tuesday, wednesday, thursday, friday, saturday, sunday);will use 1 byte to store a variable of type Days, whereas it nomally would use 4 bytes. The above code is equivalent to
{$Z1} Type Days = (monday, tuesday, wednesday, thursday, friday, saturday, sunday);
Remark: Sets are always put in 32 bits or 32 bytes, this cannot be changed (yet).
This directive controls the byte alignment of the elements in a record, object or class type definition.
It is of the following form:
{$PACKRECORDS n}
Where n is one of 1,2,4,16,C, NORMAL or DEFAULT. This means that the elements of a record that have size greater than n will be aligned on n byte boundaries. Elements with size less than or equal to n will be aligned to a natural boundary, i.e. to a power of two that is equal to or larger than the element's size. The type C is used to specify alignment as by the GNU CC compiler. It should be used only when making import units for C routines.
The default alignment (which can be selected with DEFAULT) is 2, contrary to Turbo Pascal, where it is 1.
More information on this and an example program can be found in the reference guide, in the section about record types.
Remark: Sets are always put in 32 bit or 32 bytes, this cannot be changed
Remark: Overflow checking behaviour is not the same as in Turbo Pascal since all arithmetic operations are done via 32-bit values. Furthermore, the Inc() and Dec standard system procedures are checked for overflow in Free Pascal, while in Turbo Pascal they are not.
Using the {$Q-} switch switches off the overflow checking code generation.
The generation of overflow checking code can also be controlled using the -Co command line compiler option (see Users' guide).
The {$RANGECHECKS OFF} switch tells the compiler not to generate range checking code. This may result in faulty program behaviour, but no run-time errors will be generated.
Remark: The standard functions val and Read will also check ranges when the call is compiled in {$R+} mode.
A unit that is compiled in the {$SMARTLINK ON} state will be compiled in such a way that it can be used for smartlinking. This means that the unit is chopped in logical pieces: each procedure is put in it's own object file, and all object files are put together in a big archive. When using such a unit, only the pieces of code that you really need or call, will be linked in your program, thus reducing the size of your executable substantially.
Beware: using smartlinked units slows down the compilation process, because a separate object file must be created for each procedure. If you have units with many functions and procedures, this can be a time consuming process, even more so if you use an external assembler (the assembler is called to assemble each procedure or function code block separately).
The smartlinking directive should be specified before the unit declaration part:
{$SMARTLINK ON} Unit MyUnit; Interface ...
This directive is equivalent to the -Cx command-line switch.
By default, the address operator returns an untyped pointer.
This directive is equivalent to the -St command-line option.
The following code
{$STOP This code is erroneous !}will display an error message when the compiler encounters it. The compiler will immediatly stop the compilation process.
It has the same effect as the {$FATAL} directive.
In the {$T+} or {$TYPEDADDRESS ON} state the @ operator, when applied to a variable, returns a result of type ^T, if the type of the variable is T. In the {$T-} state, the result is always an untyped pointer, which is assignment compatible with all other pointer types.
The directive
{$UNDEF name}un-defines the symbol name if it was previously defined. Name is case insensitive.
When in the + or ON state, the compiler checks that strings passed as parameters are of the same, identical, string type as the declared parameters of the procedure.
If the compiler encounters a
{$WAIT }directive, it will resume compiling only after the user has pressed the enter key. If the generation of info messages is turned on, then the compiler will display the follwing message:
Press <return> to continuebefore waiting for a keypress. Careful ! This may interfere with automatic compilation processes. It should be used for debugging purposes only.
If the generation of warnings is turned on, through the -vw command-line option or the {$WARNINGS ON} directive, then
{$WARNING This is dubious code }will display a warning message when the compiler encounters it.
{$WARNINGS ON} switches the generation of warnings on. {$WARNINGS OFF} switches the generation of warnings off. Contrary to the command-line option -vw this is a local switch, this is useful for checking parts of your code.
By default, no warnings are emitted.
The following, for instance, will not compile :
function Func (var Arg : sometype) : longint; begin ... { declaration of Func } end; ... {$X-} Func (A);The reason this construct is supported is that you may wish to call a function for certain side-effects it has, but you don't need the function result. In this case you don't need to assign the function result, saving you an extra variable.
The command-line compiler switch -Sa1 has the same effect as the {$X+} directive.
By default, extended syntax is assumed.
The {$APPTYPE XXX} accepts one argument that can have two possible values : GUI or CONSOLE. It is used to tell the windows Operating system if an application is a console application or a graphical application. By default, a program compiled by Free Pascal is a console application. Running it will display a console window. Specifying the {$APPTYPE GUI} directive will mark the application as a graphical application; no console window will be opened when the application is run. If run from the command-line, the command prompt will be returned immediatly after the application was started.
Care should be taken when compiling GUI applications; the Input and Output files are not available in a GUI application, and attempting to read from or write to them will result in a run-time error.
It is possible to determine the application type of a windows application at runtime. The IsConsole constant, declared in the Win32 system unit as
Const IsConsole : Booleancontains True if the application is a console application, False if the application is a GUI application.
When this switch is on ({$DEBUGINFO ON}), the compiler inserts GNU debugging information in the executable. The effect of this switch is the same as the command-line switch -g.
By default, insertion of debugging information is off.
This switch is recognised for compatibility only, but is ignored completely by the compiler. At a later stage, this switch may be activated.
This directive controls the emulation of the coprocessor. There is no command-line counterpart for this directive.
When this switch is enabled, all floating point instructions which are not supported by standard coprocessor emulators will give out a warning.
The compiler itself doesn't do the emulation of the coprocessor.
To use coprocessor emulation under DOS go32v1 there is nothing special required, as it is handled automatically. (As of version 0.99.10, the go32v1 platform is no longer be supported)
To use coprocessor emulation under DOS go32v2 you must use the emu387 unit, which contains correct initialization code for the emulator.
Under LINUX, the kernel takes care of the coprocessor support.
When the switch is on, no floating point opcodes are emitted by the code generator. Instead, internal run-time library routines are called to do the necessary calculations. In this case all real types are mapped to the single IEEE floating point type.
Remark: By default, emulation is on. It is possible to intermix emulation code with real floating point opcodes, as long as the only type used is single or real.
This option is recognised for Turbo Pascal compatibility, but is ignored, since the compiler works only on 386 or higher Intel processors.
This option serves to specify the include path, where the compiler looks for include files. {$INCLUDEPATH XXX} will add XXX to the include path. XXX can contain one or more paths, separated by semi-colons or colons.
for example
{$INCLUDEPATH ../inc;../i386} {$I strings.inc}
Will add the directories ../inc and ../i386 to the include path of the compiler. The compiler will look for the file strings.inc in both these directories, and will include the first found file. This directive is equivalent to the -Fi command-line switch.
Caution is in order when using this directive: If you distribute files, the places of the files may not be the same as on your machine; moreover, the directory structure may be different. In general it would be fair to say that you should avoid using absolute paths, instead use relative paths, as in the example above. Only use this directive if you are certain of the places where the files reside. If you are not sure, it is better practice to use makefiles and makefile variables.
This switch (not to be confused with the {$L file} file linking directive) is recognised for Turbo Pascal compatibility, but is ignored. Generation of symbol information is controlled by the $D switch.
This option serves to specify the library path, where the linker looks for static or dynamic libraries. {$LIBRARYPATH XXX} will add XXX to the library path. XXX can contain one or more paths, separated by semi-colons or colons.
for example
{$LIBRARYPATH /usr/X11/lib;/usr/local/lib} {$LINKLIB X11}
Will add the directories /usr/X11/lib and /usr/local/lib to the linker library path. The linker will look for the library libX11.so in both these directories, and use the first found file. This directive is equivalent to the -Fl command-line switch.
Caution is in order when using this directive: If you distribute files, the places of the libraries may not be the same as on your machine; moreover, the directory structure may be different. In general it would be fair to say that you should avoid using this directive. If you are not sure, it is better practice to use makefiles and makefile variables.
This switch can be used to set the heap and stacksize. It's format is as follows:
{$M StackSize,HeapSize}where StackSize and HeapSize should be two integer values, greater than 1024. The first number sets the size of the stack, and the second the size of the heap. (Stack setting is ignored under LINUX). The two numbers can be set on the command line using the -Ch and -Cs switches.
The {$MODE} sets the compatibility mode of the compiler. This is equivalent to setting one of the command-line options -So, -Sd, -Sp or -S2. it has the following arguments:
For an exact description of each of these modes, see appendix , on page .
This switch is recognised for Turbo Pascal compatibility, but is otherwise ignored, since the compiler always uses the coprocessor for floating point mathematics.
This switch is recognised for Turbo Pascal compatibility, but is otherwise ignored.
This option serves to specify the object path, where the compiler looks for object files. {$OBJECTPATH XXX} will add XXX to the object path. XXX can contain one or more paths, separated by semi-colons or colons.
for example
{$OBJECTPATH ../inc;../i386} {$L strings.o}
Will add the directories ../inc and ../i386 to the object path of the compiler. The compiler will look for the file strings.o in both these directories, and will link the first found file in the program. This directive is equivalent to the -Fo command-line switch.
Caution is in order when using this directive: If you distribute files, the places of the files may not be the same as on your machine; moreover, the directory structure may be different. In general it would be fair to say that you should avoid using absolute paths, instead use relative paths, as in the example above. Only use this directive if you are certain of the places where the files reside. If you are not sure, it is better practice to use makefiles and makefile variables.
Specifying {$S-} will turn generation of stack-checking code off.
The command-line compiler switch -Ct has the same effect as the {$S+} directive.
By default, no stack checking is performed.
This option serves to specify the unit path, where the compiler looks for unit files. {$UNITPATH XXX} will add XXX to the unit path. XXX can contain one or more paths, separated by semi-colons or colons.
for example
{$UNITPATH ../units;../i386/units} Uses strings;
Will add the directories ../units and ../i386/units to the unit path of the compiler. The compiler will look for the file strings.ppu in both these directories, and will link the first found file in the program. This directive is equivalent to the -Fu command-line switch.
Caution is in order when using this directive: If you distribute files, the places of the files may not be the same as on your machine; moreover, the directory structure may be different. In general it would be fair to say that you should avoid using absolute paths, instead use relative paths, as in the example above. Only use this directive if you are certain of the places where the files reside. If you are not sure, it is better practice to use makefiles and makefile variables.
The {$W} switch directove controls the generation of stackframes. In the on state ({$STACKFRAMES ON}), the compiler will generate a stackframe for every procedure or function.
In the off state, the compiler will omit the generation of a stackframe if the following conditions are satisfied:
This switch controls the generation of browser inforation. It is recognized for compatibility with Turbo Pascal and Delphi only, as Browser information generation is not yet fully supported.