<p>Am 29.08.2017 14:26 schrieb "Anton Shepelev" <<a href="mailto:anton.txt@gmail.com">anton.txt@gmail.com</a>>:<br>
><br>
> Karoly Balogh to Anton Shepelev:<br>
><br>
> >>According to Borland's official language guide to<br>
> >>Turbo Pascal 7.0,<br>
> >><br>
> >> To be used as procedural values, procedures and<br>
> >> functions must be declared with a 'far' directive<br>
> >> or compiled in the '{$F+}' state.<br>
> >><br>
> >>whereas Free Pascal in -Mtp seems to accept any<br>
> >>non-system procedure or function as a value of a<br>
> >>procedural type. Is it an instance of TP incompat-<br>
> >>ibilty or am I missing something?<br>
> ><br>
> >It's documented, that Free Pascal ignores far and<br>
> >near directives because they were for 16bit code,<br>
> >and have no meaning in 32bit or 64bit code:<br>
> ><br>
> > <a href="https://www.freepascal.org/docs-html/user/usersu82.html">https://www.freepascal.org/docs-html/user/usersu82.html</a><br>
> ><br>
> >Therefore it's logical that the compiler also ig-<br>
> >nores their absence.<br>
><br>
> Ignoring them in the sense of not affecting the gen-<br>
> erated machine code is perfectly OK, but not requir-<br>
> ing their presence in the source, to make the pro-<br>
> gram compilable in Turbo Pascal, seems wrong when<br>
> Free Pascal is in Turbo Pascal mode. A program that<br>
> Free Pascal compiles successfully in TP mode should<br>
> work with the actual Turbo Pascal compiler. Is it<br>
> not the purpose of these modes? Do they guarranty<br>
> only forward-compatibility?</p>
<p>The modes are for the case have code written for other compilers (TP, MacPas, Delhi, ISO) work in FPC (as good as reasonably possible). We do however *not* guarantee that code written in one of these modes with FPC compiles or runs with the corresponding compiler.</p>
<p>Regards,<br>
Sven</p>