Open source compiler for Pascal and Object Pascal
open sourceGPL-2.0-or-laterself-hostablefree
Free Pascal (FPC) is a mature, versatile open source compiler for Pascal and Object Pascal, written in Pascal itself. Its syntax is highly compatible with Turbo Pascal 7.0 and most versions of Delphi (classes, RTTI, exceptions, interfaces), it has a Mac Pascal mode for Think Pascal and MetroWerks code, and it adds function and operator overloading. It targets x86 (16, 32 and 64 bit), PowerPC, SPARC, ARM, AArch64, MIPS, 68k, AVR and the JVM, on Windows, Linux, macOS and iOS, the BSDs, DOS, Android, Haiku, AmigaOS and embedded platforms, with RISC-V, Xtensa, WebAssembly and an LLVM backend in the development version. The team also maintains pas2js, a Pascal-to-JavaScript transpiler. The compiler is under the GNU GPL, and its runtime library and packages under a modified LGPL that allows static linking into applications of any licence.
Problems it solves
- compile my old Turbo Pascal or Delphi code on a modern operating system
- a free Object Pascal compiler for Linux, macOS and Windows
- cross-compile a native program for ARM, embedded boards or retro systems
- build native desktop applications in Pascal without paying for Delphi
- compile Pascal code to JavaScript for the browser
Features
- Turbo Pascal 7.0 and Delphi compatibility modes
- Mac Pascal mode
- function and operator overloading
- many CPU targets: x86, x86-64, ARM, AArch64, PowerPC, SPARC, MIPS, 68k, AVR, JVM
- Windows, Linux, macOS, iOS, BSD, DOS, Android and embedded targets
- self-hosting compiler written in Pascal
- pas2js Pascal-to-JavaScript transpiler
Capabilities
| Has a command line tool | plan not known |
|---|
Alternatives
The same job
These do what Free Pascal does.