Node:BP Incompatibilities, Next:IDE versus command line, Previous:BP Compatibility, Up:Borland Pascal

### BP Incompatibilities

This sections lists the remaining incompatibilities of GPC to BP, and the problems you might encounter when porting BP programs from 16-bit Dos to other platforms, and gives solutions for them.

By incompatibilites we mean problems that can arise when trying to compile a valid BP program with GPC. Of course, there are many features in GPC that BP doesn't know, but we call them extensions unless they can break valid BP programs, so they are not mentioned here. The subsequent sections of the `Borland Pascal` chapter mention a number of useful extensions that you might want to know about but which will not break your BP code.

- String type:
- Qualified identifiers:
- Assembler:
- Move; FillChar:
- Real type:
- Graph unit:
- OOP units:
- Keep; GetIntVec; SetIntVec:
- TFDDs:
- Mem; Port; Ptr; Seg; Ofs; PrefixSeg; etc.:
- Endianness assumptions:

Some of the differences can be "overcome" by command-line switches. As a summary:

    --borland-pascal -w --uses=System -D__BP_TYPE_SIZES__ --pack-struct
    -D__BP_RANDOM__ -D__BP_UNPORTABLE_ROUTINES__ -D__BP_PARAMSTR_0__

But please read the following notes, and don't use these switches indiscriminately when not necessary. There are reasons why they are not GPC's defaults.

- - -borland-pascal - disable GPC extensions:
- -w - disable all warnings:
- - -uses=System - Swap; HeapError; etc.:
- -D__BP_TYPE_SIZES__ - small integer types etc.:
- - -pack-struct - disable structure alignment:
- -D__BP_RANDOM__ - BP compatible pseudo random number generator:
- -D__BP_UNPORTABLE_ROUTINES__ - Intr; DosVersion; etc.:
- -D__BP_PARAMSTR_0__ - BP compatible ParamStr (0) behaviour: