Next: Things which are extra
Up: Porting Turbo Pascal Code
Previous: Porting Turbo Pascal Code
Here we give a list of things which are defined/allowed in Turbo Pascal, but
which are not supported by Free Pascal. Where possible, we indicate the reason.
- Parameter lists of previously defined functions and procedures must
match exactly. The reason for this is the function overloading mechanism of
Free Pascal. (however, See 5.1)
- (* ... *) as comment delimiters are not allowed in versions
older than 0.9.1. This can easily be remedied with a grown-up editor.
- The MEM, MEMW, MEML and PORT variables for memory and port
access are not available. This is due to the operating system. Under
DOS, the extender unit (GO32.PPU provides functions to remedy this.
- PROTECTED, PUBLIC, TRY, THROW, EXCEPTION are reserved words.
This means you cannot create procedures or variables with the same name.
While they are not reserved words in Turbo Pascal, they are in Delphi.
- The reserved words FAR, NEAR are ignored. This is
because Free Pascal is a 32 bit compiler, so they're obsolete.
- INTERRUPT only will work on a DOS machine.
- Boolean expressions are only evaluated until their result is completely
determined. The rest of the expression will be ignored.
- At the moment of writing, the assembler syntax used in Free Pascal is AT&T
assembler syntax. This is mainly because Free Pascal uses gnu as.
- Turbo Vision is not available.
- The 'overlay' unit is not available. It also isn't necessary, since
Free Pascal is a 32 bit compiler, so program size shouldn't be a point.
- There are more reserved words. (see appendix B for a
list of all reserved words.)
- The command-line parameters of the compiler are different.
- The compiler switches behave different.
- Units are not binary compatible.
Michael Van Canneyt
Tue Mar 31 16:44:14 CEST 1998