Free Pascal: Wikis

  
  

Note: Many of our articles have direct quotes from sources you can cite, within the Wikipedia article! This article doesn't yet, but we're working on it! See more info or our list of citable articles.

Encyclopedia

From Wikipedia, the free encyclopedia

Free Pascal
FPCWin64.png
A private build of Free Pascal cross-compiler (from i386-win32 to x86_64-win64), version 2.3.1
Developer(s) Florian Klämpfl & Volunteers
Stable release 2.4.0 / January 1, 2010; 2 month(s) ago (2010-01-01)
Written in Object Pascal and Assembly
Operating system Cross-platform
Type Compiler
License GNU General Public License
Website http://www.freepascal.org
The Free Pascal IDE for Linux. The computer was being prepared for use in the 2002 National Olympiad in Informatics, China

Free Pascal (FPC for short, and formerly known as FPK Pascal[1]) is a free, portable and open source compiler for Pascal and Object Pascal languages. It supports a number of dialects, including the two most popular Borland dialects—Turbo Pascal and Delphi—and some Mac Pascal constructs.

Free Pascal is available on many architectures and operating systems (see Targets), and belongs to the write once, compile anywhere campaign. It has an excellent support for integration of assembly language, and supports multiple architectures and notations in the internal assembler.

With a separate IDE project called Lazarus, cross-platform graphical application development is possible with little effort.

Contents

Supported dialects

Free Pascal adopted the de facto standard dialects of modern Pascal programmers—the Borland dialects. From version 2.0 on, the Delphi 7 compatibility has been continuously implemented or improved.

In fact, the project has a compilation mode concept, and the developers made it clear that they would incorporate working patches for the ANSI/ISO standardized 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 and Mac OS X. Since the Apple dialect implements some of the Standard Pascal features that Turbo Pascal and Delphi miss, Free Pascal is a bit more ISO-compatible than these.

The 2.2.x series does not significantly change the dialect objectives beyond Delphi 7, instead they aim for a more close compatibility. The project still lacks some Delphi functionality, namely, compiler-supported exporting of classes from shared libraries, which is useful, for example, for Lazarus, which implements packages of components.

In the current development branch, several D2006 specific features have been added, and have some of the starting work for D2009 features (most notably TUnicodeString) done. The development branch also features an Objective Pascal extension for Objective C (Cocoa) interfacing.

History

The early years

Free Pascal emerged when Borland made it clear that there would be no Borland Pascal 8, and the next version would be a Windows-only product (which became Delphi later on).

Florian Paul Klämpfl, a then-student, started working on his own compiler. The compiler was written in the Turbo Pascal dialect from the start, and produced 32-bit code for the go32v1 extender, which was used and developed by the DJGPP project at that time.

Originally, the compiler itself was a 16-bit DOS executable produced by Turbo Pascal. After two years, the compiler was able to compile itself, so it became 32-bit, too.

Expansion

The initial 32-bit compiler was published on the Internet, and the first contributors joined the project.

In later years, a Linux port was made by Michael van Canneyt, five years before Kylix became available.

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 was the last release aiming only for Turbo Pascal compliance—later releases would add a Delphi compatibility mode. This release was also ported to systems using a 680x0.

With the 0.99.8 release, the Win32 target was added, and a start was made with incorporating some Delphi features. Stabilizing for a 1.0 release began, and this milestone was reached in July 2000. The 1.0.x series was widely used, both as an enterprise and educational tool. For the 1.0.x releases, the port to 68k CPU was redone, and the compiler produces stable code for a number of 68k Unix, and AmigaOS.

The second generation

During the stabilization of what would become 1.0.x, and specially when porting to the Motorola 68k systems, it was clear that 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, the 1.1.x branched from the 1.0.x main branch in December 1999. At first, changes were mostly clean-ups 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 and Fall, 2004, respectively. The AMD64 port followed in early 2004, which made the compiler available for a 64-bit platform.

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 (January 2005), 1.9.8 (late February 2005), 2.0.0 (May 2005), 2.0.2 (December 2005), and 2.0.4 (August 2006).

Consolidation: the 2.2 series

During 2006, some of the major reworks planned for 2.2, such as the rewrite of the unit system, had not started yet, and it was decided to start stabilizing the already implemented features.

Some of the motivations for this roadmap change were the needs of the Lazarus project, particularly the internal linker, support for Win64, Windows CE, and Mac OS X on x86, and related features like DWARF. After a short series of betas (2.1.2 and 2.1.4), the version 2.2.0 was released in September 2007, followed by the version 2.2.2 in August 2008, and then version 2.2.4 in March 2009.

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 complete.[2]

Aside from the language support, the library support for ActiveX was also improved.

Another major highlight was the internal linker for Win32, Win64, and Windows CE, which strongly improves linking time and memory use, and makes the compile-link-run cycle in Lazarus much more bearable. The efficiency for smart-linking, or dead code elimination, has also been improved.

Minor new features are improved DWARF (2/3) debug format support, and optimizations like tail recursion, omission of unneeded stack frames and register-based CSE optimization. A first implementation of generics support is also available, but only for exploration purposes.

It is currently unsure if the improved in-binary resource support in 2.3.x will be merged to 2.2.4.

Targets

Free Pascal's availability depends on the major version.

Version 2.4.0

In addition to most targets supported by 2.2, this version supports:

Version 2.2.4

Version 2.0.x

Processors:

Operating systems:

Version 1.0.x

Processors:

Operating systems:

Beta platforms:

Application software produced with Free Pascal

  • Pixel image editor: a Photoshop-like image editor, arguably one of the best-known software created with Free Pascal.
  • SFS Technology: Linux technology to use portable stand-alone applications on various Linux distributions (like Ubuntu).
  • Peazip: an open source archiver.
  • Morfik: Morfik WebOS AppBuilder uses Free Pascal to produce the resulting CGI binaries.
  • MRIcron: 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 (NPM) and conversion of images from DICOM format to NIfTI format (dcm2nii). It is currently available for Windows (using WinAPI), Linux (GTK1, GTK2 or QT), and Mac OS X (Carbon or GTK1).
  • Virtual Magnifying Glass: a free, open source, screen magnification tool for Windows and Linux. It is simple, customizable, and easy-to-use. It is 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, Mac OS X and Windows.
  • Audio X: a music player and library software. 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 Jukebox: an audio player that comes with a database to organize your MP3 file collection. It is currently available for Linux and Win32.
  • Becape: an open source backup tool aimed to personal and desktop usage. It does incremental backups, and stores the backup info in a SQLite database allowing to restore the exact state of the backed files at a chosen date.
  • Master Maths: a software for mathematics training. Developed with Lazarus, and makes use of Firebird and tiOPF v2. The complete product runs under Linux and Windows.
  • QFront: a cross-platform frontend for the CPU emulator QEMU.
  • OutKafe: next-generation free and open source cybercafe management suite. OutKafe is running hundreds cybercafe’s at business, schools and other establishments around the world.
  • CQRLOG: an advanced amateur radio logger based on Firebird database. It 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.
  • Dedalu: a collection of small and simple projects developed with Lazarus and Free Pascal by Giuseppe Ridinò (a.k.a. Pepecito). They are games, editors, utilities, etc.
  • TruckBites: business management software for independent trucking companies and owner or operators (for the USA.) Created under contract by Tony Maro for both Linux and Windows for "Partners in Trucking, LLC".
  • Mundo The Game: an in-progress open-source multi-platform 3D MMORPG.

See also

  • Lazarus: an IDE (Integrated Development Environment) and RAD (Rapid Application Development) software based on Free Pascal.
  • Morfik: an RAD IDE for Ajax-based Web applications that uses Free Pascal as the back-end for server-side compiling.

References

  1. ^ Free Pascal used to be known as FPK Pascal, where FPK stands for the author Florian Paul Klämpfl. The name of the project was changed to Free Pascal Compiler at the end of 1997.
  2. ^ http://bugs.freepascal.org/view.php?id=8951

External links

General introduction

Official websites

Development tools

  • FPS Complete Win32 based IDE for FPC, including debugger (trace, breakpoint and watch windows).
  • DevPascal Win32 based IDE for FPC.
  • MSEide+MSEgui - a RAD/Cross Platform GUI Development System for FPC
  • Morfik Win32 based IDE for build Ajax-based web applications that uses FPC for compiling back-end server side logic.

Sites specialized in game development








Got something to say? Make a comment.
Your name
Your email address
Message