1.2.22 $F : Far or near functions

This directive is recognized for compatibility with Turbo Pascal. Under the 32-bit and 64-bit programming models, the concept of near and far calls have no meaning, hence the directive is ignored. A warning is printed to the screen, as a reminder.

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+0000

One can see that the verbosity level was set to display warnings.

When declaring 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