[fpc-pascal] Docs: portability differences between Borland/FPC

Bart bartjunk64 at gmail.com
Sat Aug 18 23:52:27 CEST 2018


On Sat, Aug 18, 2018 at 10:59 PM, Martok <listbox at martoks-place.de> wrote:

> There is the old "Porting TP" document at <https://www.freepascal.org/port.var>, but it is rather incomplete (and probably on an
> older language level). It also covers mostly syntactic differences - things a programmer will notice because of the error messages.

{ Continued from above }
 if I > 99 then
   Writeln('This is not a Percentage')

Borland
Does exactly what is written.

TurboPascal 6.0 will not do that. It will execute the else statment if
there is one. (example compiled with {$R-})
 if I > 99 then
   Writeln('This is not a Percentage')
  else
    writeln('I = ',I);

It will print: I = 100

Tested with TP 6.0 on FreeDos 1.2

Bart



More information about the fpc-pascal mailing list