next up previous contents
Next: Things which are extra Up: Porting Turbo Pascal Code Previous: Porting Turbo Pascal Code

Things that will not work

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.

  1. 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)
  2. (* ... *) as comment delimiters are not allowed in versions older than 0.9.1. This can easily be remedied with a grown-up editor.
  3. 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.
  4. 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.
  5. The reserved words FAR, NEAR are ignored. This is because Free Pascal is a 32 bit compiler, so they're obsolete.
  6. INTERRUPT only will work on a DOS machine.
  7. Boolean expressions are only evaluated until their result is completely determined. The rest of the expression will be ignored.
  8. 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.
  9. Turbo Vision is not available.
  10. 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.
  11. There are more reserved words. (see appendix B for a list of all reserved words.)
  12. The command-line parameters of the compiler are different.
  13. The compiler switches behave different.
  14. Units are not binary compatible.


Michael Van Canneyt
Tue Mar 31 16:44:14 CEST 1998