- Free Pascal
Infobox_Software
name = Free Pascal
caption = Free Pascal being operated via the command line
developer = Florian Klämpfl &Volunteer s
latest_release_version = 2.2.2
latest_release_date =August 11 ,2008
operating_system =Cross-platform
genre =Compiler
license =GNU General Public License
website = http://www.freepascal.orgFree Pascal (or FPK Pascal or FPC) is a free, portable,
open source , Pascal andObject Pascal compiler . The 32/64-bit multi-architecture and multi-operating systemcompiler implements the Borland Pascal dialects (Turbo Pascal and Delphi) as well as some MacPascal constructs, and is available formost common operating systems.Free Pascal used to be known as FPK Pascal, since FPK are the initials of the author,
Florian Paul Klämpfl . FPK Pascal never meant "Free Pascal Kompiler". Writing "Compiler" with K is uncommon in German. To avoid this confusion, at the end of1997 the name of the project was changed into Free Pascal Compiler (FPC).Free Pascal comes with a
text user interface IDE resembling Turbo Pascal's IDE (Turbo Vision ). This IDE deteriorated for some time because of a missing maintainer, but in a common effort in the second half of2005 and the first months of2006 , most major bugs were fixed and the IDE became release-worthy again.Like
Turbo Pascal and Delphi, Free Pascal has excellent support for integration ofassembly language in the Pascal code. FPC supports multiple architectures and notations in the internal assembler.The visual parts of the Delphi libraries (the VCL) and the creation of a visual IDE and RAD are part of a separate project, Lazarus.
Language dialect
FPC adopted the de facto standard dialects of Pascal programmers: the Borland dialects. (Specifically: Borland Pascal 7 and Delphi 2 for version 1.0.x, and for version 2.0.x the target versions for the Delphi compatibility changed to 6/7). However, the project has a compilation mode concept, and the developers made it clear that they would incorporate working patches for the ANSI/ISO standardised dialects to create a standards compliant mode.
A small effort has been made to support some of the Apple Pascal syntax, to ease interfacing to Mac OS (X). Since the Apple dialect implements some of the Standard Pascal features that TP/Delphi miss, FPC is a bit more ISO compatible than these.
The 2.2.x series doesn't significantly change the dialect objectives beyond D7, instead aiming for close compatibility. The project still has missing Delphi functionality, mainly compiler supported exporting of classes from shared libraries (useful for e.g. Lazarus, which implements packages of components).
History
The early years
Free Pascal emerged when
Borland made clear there would be no Borland Pascal 8, and the next versionwould be a Windows-only product (which became Delphi later on), and a student (Florian Paul Klämpfl) started working on his own compiler. The compiler was written in the (Borland )Turbo Pascal dialect from the start and produced 32-Bit code for the go32v1DOS extender used and developed by theDJGPP project at this time. Originally the compiler itself was a16-bit DOS executable compiled byTurbo Pascal . After two years, the compiler was able to compile itself so it became32-bit too.Expansion
The initial 32-bit compiler was published on the net, and the first contributors joined the project. In the years after publishing on the Internet, a Linux port was made by Michael van Canneyt (a full five years before Kylix), the DOS port was adapted for use in OS/2 through the EMX extender. The DOS version also improved gradually, and migrated to the go32v2 extender. This culminated in the 0.99.5 release which was much more widely used than previous versions, and the last release aiming only for Turbo Pascal compliance: later releases would add a Delphi compatibility mode. 0.99.5 was also ported to systems using a 680x0 CPU.
With 0.99.8, the Win32 target was added, and a start was made with incorporating some Delphi features. Stabilising for a 1.0 release started, and this milestone was reached in July 2000. The 1.0.x series (and the bug-fix/stabilisation releases that followed, last, 1.0.10 in July 2003) was widely used, both as an enterprise and educational tool. For the 1.0.x releases, the port to 680x0 CPUs was redone, and the compiler produces stable code for a number of 68k
Unix es andAmigaOS .The second generation
During the stabilisation of what would become 1.0.x, and specially when porting to the m68k systems, it was clear the design of the code generator was far too limited in many ways. The principal problems were that adding processors basically meant rewriting the code generator, and that the register allocation was based on the principle of always keeping three free registers between building blocks, which was inflexible and hard to maintain.
For these reasons, FPC 1.1.x branched from the 1.0.x main branch in December 1999. At first, changes were mostly cleanups and rewrite/design to all parts of the compiler, and then the code generator and register allocator were rewritten. As a bonus, remaining missing Delphi compatibility was added.
The work on 1.1.x continued slowly but steadily, and in late 2003 the PowerPC port started working, followed by ARM and
SPARC ports in summer/fall 2004. The AMD64 port followed in early 2004. The AMD64 port effectively made the compiler 32/64-bit.In November 2003, a first beta release of the 1.1.x branch was packaged, and for the occasion, the version number was changed to 1.9.0. These were quickly followed by version 1.9.2 and 1.9.4. Version 1.9.4 was special because it was the first version with Mac OS X support.
The work continued with version 1.9.6 (Jan 2005), 1.9.8 (late Feb 2005), 2.0.0 (May 2005), 2.0.2 (Dec 2005), 2.0.4 (Aug 2006), and the current stable release.
Consolidation: The 2.2 series
During 2006, some of the major reworks planned for 2.2 like the rewrite of the unit system hadn't started yet, and it was decided to start stabilizing the already implemented features. This to allow a 2.2 release, and push the unimplemented features to a future 2.3/2.4 branch. Some of the motivations for this roadmap change were the needs of the
Lazarus projects, particularly the internal linker, win64, wince and OS X/x86 support and features related to them (like Dwarf). After a short series of betas (2.1.2 and 2.1.4), 2.2.0 was released in September 2007 and 2.2.2 was released in August 2008.The 2.2.x series vastly improve the ActiveX/COM, interface and OLE support, though bugs are still being found. The delegation to interface using the "implements" keyword is partially implemented but not [http://bugs.freepascal.org/view.php?id=8951 complete] . Aside from the language support, also the library support for ActiveX was vastly improved (and this will continue with 2.2.2). The other major highlight was the internal linker for win32/win64/CE which strongly improves linking time and memory use, and makes the compiler/link/run cycle in Lazarus more bearable. Smartlinking (dead code elimination) efficiency has also been improved.
Minor new features are improved Dwarf debug format support, and optimizations like tail recursion, omission of unneeded stackframes and temp (register) based CSE optimization. A first implementation of generics support is also available, but only for exploration purposes.
Currently it is unsure if the improved in-binary resource support in 2.3.x will be merged to 2.2.2.
The future
The following features are missing from 2.2.0 and are needed. Those marked with † are currently actively being worked on in the 2.3.1 branch.
*Linking/debug/file formats related:
**Improved "packages" and dynamic libraries (PIC!) support in general. Currently the Free Pascal core has no short term plans in this direction, due to practical problems for non Windows platforms.
** Some form of Kylix compatible resources. This feature has been backported from the 2.3 branch to the 2.2 branch, and will be in 2.2.2
*Apple Pascal related
**Being able to pass a subprocedure to a different procedure as a procvar.
**Objective Pascal to ease COCOA interfacing.Some of these features, especially in the linking section, may require changes:
*Rewrite of module (unit) handling, postponed to post 2.4
Targets
The FPC compiler's availability depends on the major version.
Version 2.3.x (development version)
In addition to all targets supported by 2.2, this version supports:
*
Symbian OS - with UIQ toolkit
* Mac OS X 64-bit (Darwin/x86_64)Version 2.2.x (current stable)
The current stable version 2.2.0 adds support for the following systems, on top of existing platforms in 2.0.x:
*Win64
*Mac OS X (on Intel, i386)
*PowerPC 64-bit
*Windows CE (Windows Mobile)
* Nintendo Game Boy Advance (standard ARM only)
*Nintendo DS Version 2.0.x
Processors:
*iA-32 :Intel 80386 , compatible processors, and later Intel processors of the same family (80486 and the Pentiums).
**AMD64 : x86_64
*PowerPC
*ARM
*SPARC v8 and v9Operating systems:
*Linux : all CPUs
* BSD and family
**FreeBSD
**Mac OS X and Darwin (PowerPC)
*Mac OS
*DOS ; Go32V2 extender. PMode extender sometimes used for embedded systems
*Win32 (Microsoft Windows 95 and all later versions)
*OS/2 : EMX and native
*Novell NetWare
*MorphOS Version 1.0.x
The previous stable release "1.0.x" was available for processors
*Intel 80386 and compatibles
*Motorola 680x0 and supported the following
operating system s
*Linux : x86/m68k
* BSDs
**FreeBSD
**NetBSD : x86/m68k
*DOS : Go32V2 extender. PMode extender sometimes used for embedded projects
*Win32
*OS/2 : EMX
*Amiga Classic, m68kand the beta platforms:
*BeOS , beta
*A beta forOpenBSD /x86 existed at some point.
*SunOS , Solaris
*QNX
*Windows CEApplications software produced with Free Pascal
*
Pixel image editor : Photoshop-like image editor made with FPC
*Peazip : open source archiver, made with Lazarus/FPC
*Morfik : Morfik WebOS AppBuilder uses Free Pascal to produce the resulting CGI binaries
* [http://www.mricro.com/mricron/ MRIcron] is a medical image visualization and analysis package. The software provides tools for drawing volumes of interest and volume rendering. In addition, it includes non-parametric statistical mapping ( [http://www.mricro.com/npm/ npm] ) and conversion of images from DICOM format to NIfTI format ( [http://www.mricro.com/mricron/dcm2nii.html dcm2nii] ). Made with Lazarus/FPC, it is currently available for Windows (using WinAPI), Linux (GTK1, GTK2 or QT) and Macintosh OSX (Carbon or GTK1).
* [http://magnifier.sourceforge.net/ Virtual Magnifying Glass] is a free, open source, screen magnification tool for Windows and Linux. It is simple, customizable, and easy-to-use. It's currently available for Windows, Linux and FreeBSD. With over 170.000 downloads and a 5 years history, the magnifier aims to bring an easy to use accessibility tool to those who need it. Available for Linux, OSX and Windows, it is made with Lazarus/FPC.
* [http://www.ullihome.de Audio X] : music player and library software; made with Lazarus/FPC, it plays MP3, OGG, WMA, MAC, WAV and FLAC files and stores user-provided meta data either in the files themselves (ID3v2 ,Vorbis comment ) or in XML files when this is not possible.
*Cactus is an audio player that comes with a database to organize your mp3 file collection. Take a look at [http://cactus.hey-you-freaks.de Cactus Homepage] . It's plattform independent and currently available for linux and win32. Made with Lazarus/FPC.
* [https://sourceforge.net/projects/becape/ Becape] is a open source backup tool aimed to personal/desktop usage. It does incrementall backups and stores the backup info in a sqlite database allowing to restore the exact state of the backed files at a chosen date. It's fully written in Lazarus/Freepascal.
* [http://www.mastermaths.co.za Master Maths] specialises in computer based training and maths. The third incarnation of our flagship product is developed using Lazarus, Firebird and [http://www.techinsite.com.au tiOPF v2] . The product has two parts. A Administration application and a Learner Browser (used to view and mark the teaching modules). The Learner Browser uses Macromedia Flash extensively. The complete product runs under Linux and Windows. Made with Lazarus/FPC.
* [http://www.ullihome.de QFront] is a platform independent Frontend for the CPU Emulator QEmu. Made with Lazarus/FPC.
* [http://outkastsolutions.co.za/outkast/index.php?option=com_openwiki&id=outkafe OutKafe] is a next-generation free and open source cybercafe management suite. OutKafe is licensed under the GNU/GPL version 3, and can be used free of charge. OutKafe is developed by A.J. Venter with sponsorship from OutKast I.T. Solutions C.C. and the kind contributions of several volunteers. OutKafe is running hundreds cybercafe’s at business, schools and other establishments around the world. Made with Lazarus/FPC.
* [http://sourceforge.net/projects/cqrlog/ CQRLOG] is an advanced ham radio logger based on Firebird database. Provides radio control based on hamlib libraries (currently support of 140+ radio types and models), DX cluster connection, QRZ callbook (web version), a grayliner, ON6DP QSL manager database support and a most accurate country resolution algorithm based on country tables developed by OK1RR. CQRLOG is strongly focused on easy operation and maintenance. Made with Lazarus/FPC.
* [http://dedalu.sourceforge.net/ Dedalu] is a collection of small and simple projects developed in Lazarus/FPC by Giuseppe Ridinò (aka Pepecito). They are games, editors, utilities, etc.
* [http://www.truckbites.com TruckBites] business management software for independent trucking companies and owner/operators (for the USA.) Written with Lazarus/FPC under contract by Tony Maro for both Linux and Windows for "Partners in Trucking, LLC".ee also
*Lazarus: a
Rapid Application Development (RAD)Integrated Development Environment (IDE)External links
General introduction
* [http://www.osnews.com/story.php?news_id=10607 Introduction to Free Pascal 2.0] , by Daniël Mantione, with in-depth introduction to the new version and a bit of its development history.
* [http://www.friends-of-fpc.org/tutorials/basics/dlx_fpc/index.html Getting Started with FPC] .Official websites
* [http://www.freepascal.org Free Pascal]
* [http://lazarus.freepascal.org Lazarus, an RAD for FPC]
* [http://www.freepascal.org/fpcmac.html FPC on Mac] -- Status page for FPC to Classic Mac OS ports. (Mac OS X port is done by the FPC Unix crew)Development tools
* [http://ims.mii.lt/fps/en/about/index.html FPS] Complete Win32 based IDE for FPC, including debugger (trace,
breakpoint and watch windows).
* [http://www.bloodshed.net/devpascal.html DevPascal] Win32 based IDE for FPC.
* [http://www.homepage.bluewin.ch/msegui/ MSEide+MSEgui] - a RAD/Cross Platform GUI Development System for FPC
* [http://crossfpc.untergrund.net/ CrossFPC] - a free toolkit to integrate the Free Pascal compiler, targeting various OS and hardware platforms, into theBorland Delphi IDE. See more about it from [http://www.codecomments.com/Kylix/message541921.html this mailing list discussion] .ites specialized in game development
* [http://www.pascalgamedevelopment.com Pascal Game Development] .
* [http://fpc4gba.pascalgamedevelopment.com FPC 4 GBA Initiative] Free Pascal support project for the GameBoy Advance platform.
* [http://itaprogaming.free.fr/tutorial.html FPC 4 GBA Programming Tutorial] An extensive tutorial into game programming on the Game Boy Advance with Free Pascal.
Wikimedia Foundation. 2010.