Free Pascal

Free Pascal (or FPK Pascal) is a 32-bit and 64-bit Pascal compiler.

Contents

Introduction

Free Pascal is a 32/64-bits multi CPU architecture and multi Operating System compiler. The compiler implements the Borland Pascal dialects (Turbo Pascal and Delphi) and is available for most common operating systems.

Free Pascal used to be known as FPK Pascal. FPK are the initials of the author. FPK Pascal never meant "Free Pascal Kompiler" though a lot of people thought so. Writing "Compiler" with K is very unknown in German anyway. At the end of 1997, the name of the project was changed into Free Pascal Compiler (FPC) to avoid this confusion and because more and more people did contribute.

Currently version 2.0.0 is the latest stable version of Free Pascal.

FPC is a reasonably well documented Open Source project, with a manual that counts over 1000 pages.

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.

Free Pascal comes with a textmode IDE resembling Turbo Pascal's IDE. Though this IDE was a bit in detoriation for some time because of a missing maintainer, in a common effort most bugs were fixed so it's in a pretty good shape now.

Language dialect

FPC conformed to reality, and adopted the de-facto standard dialects of Pascal, used by 99% of the Pascal programmers: the Borland dialects. (Specifically: Borland Pascal 7 and Delphi 2 for version 1.0.x, and for version 2.0.x - Delphi 6/7).

However the project has a compilation mode concept, and the team made clear that it would incorporate working patches for the Ansi/ISO standardised dialects to create a standards compliant mode.

Also, a small effort has been made to support some of the Apple Pascal syntax, to ease interfacing to Mac OS (X).

Missing Delphi functionality

  • Delegation using the "implements" keyword
  • automatic COM IDispatch dual interfaces (dispinterfaces)
  • dispid in normal interfaces
  • packages
  • set types can have different size.

History

The early years

Free Pascal emerged when Borland made clear there would be no Borland Pascal 8, and the next version would be a Windows-only product (which turned out to become 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 go32v1 DOS extender used and developed by the DJGPP project at this time. Originally the compiler itself was a 16-bit Dos executable compiled by Turbo Pascal. After two years, the compiler was able to compile itself so it became 32-bit too.

Expansion

The proto 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 5 years before Kylix), the Dos port was adapted to the OS/2 EMX extender for OS/2 use, and the dos version improved gradually, and migrated to the go32v2 extender. This culminated in the 0.99.5 release that was much more widely used than the versions before, and the last Turbo Pascal only release, since the later releases would add a Delphi compability mode. 0.99.5 was also ported to systems using a 680x0 CPU.

In 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 bugfix/stabilisation releases that followed, last, 1.0.10 in july 2003) were widely used, both in commerce and education. For the 1.0.x releases, the port to 680x0 CPUs was redone, and the compiler produces stable code for a number of 68k unices and AmigaOS.

The Next 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 codegenerator was far too limited in many ways. The two most principal problems were that adding processors basically meant rewriting the codegenerator, and that the register allocation was based on a principle (always keep 3 free registers between building blocks) that was hard to maintain and inflexible.

Because of this reasons, FPC 1.1.x branched from the 1.0.x beta branch in december 1999. At first, changes were mostly cleanups and rewrite/design to all parts of the compiler, and then the codegenerator and register allocator was rewritten. As a bonus, remaining missing Delphi compability was added.

The work on 1.1.x continued slowly but steadily, and in early 2003 the PowerPC port started working, quickly followed by AMD64 (on the simulator, no silicon yet at that time), and initial ARM and Sparc ports. 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 upped to 1.9. These were followed quickly by 1.9.2 and 1.9.4. 1.9.4 was special because it was the first version with Mac OS X compability.

The work continued with 1.9.6 (jan 2005) and 1.9.8(late feb 2005) and version 2.0.0 was finally released in May 2005[1] (http://www.osnews.com/story.php?news_id=10607).

The future

Road map for the shortterm (2.1.x)

  • create/improve the COM/OLE support. This has multiple facets:
    • COM compat interfaces/vmt
    • Variants (needed for OLE)
    • implements style delegation
  • linking/debug/fileformats related:
    • improve smartlinking (get rid of .a files, less mem use)
    • improved "packages" and dynamic libraries (PIC!) support in general.
    • crosslinking (2.0 is actually quite crosslink capable already)
    • stabs->dwarf crossover.
    • Some form of Kylix compat resources.(still under discussion)
  • Support for 64-bit (sized) native filetypes.
  • Apple Pascal related
    • Being able to pass a subprocedure to a different proc as procvar.

Some of these target functionality (specially in the linking section) might require restructures related to

  • introduction of an internal linker for some core platforms (no more LD)
  • Rewrite of module (unit) handling

Targets

The FPC compiler's availability depends on the major version.

The current stable version 2.0.0 has support for the following processors

The operating system list is:


The previous stable release 1.0.x was available for processors

and supported the following operating systems

and the beta platforms:

External links

  • FPC on Mac (http://www.freepascal.org/fpcmac.html) -- Status page for FPC to Classic Mac OS ports. (Mac OS X port is done by the FPC Unix crew)
  • Free Pascal (http://www.freepascal.org)
  • Lazarus, a RAD for FPC (http://lazarus.freepascal.org)
  • Introduction to Free Pascal 2.0 (http://www.osnews.com/story.php?news_id=10607), by Daniël Mantione, with in-depth introduction to the new version and a bit of its development history.bg:Free Pascal

de:Free Pascal es:Free Pascal fi:Free Pascal pl:Free Pascal ro:Free Pascal zh:Free Pascal ru:Free Pascal

Navigation

  • Art and Cultures
    • Art (https://academickids.com/encyclopedia/index.php/Art)
    • Architecture (https://academickids.com/encyclopedia/index.php/Architecture)
    • Cultures (https://www.academickids.com/encyclopedia/index.php/Cultures)
    • Music (https://www.academickids.com/encyclopedia/index.php/Music)
    • Musical Instruments (http://academickids.com/encyclopedia/index.php/List_of_musical_instruments)
  • Biographies (http://www.academickids.com/encyclopedia/index.php/Biographies)
  • Clipart (http://www.academickids.com/encyclopedia/index.php/Clipart)
  • Geography (http://www.academickids.com/encyclopedia/index.php/Geography)
    • Countries of the World (http://www.academickids.com/encyclopedia/index.php/Countries)
    • Maps (http://www.academickids.com/encyclopedia/index.php/Maps)
    • Flags (http://www.academickids.com/encyclopedia/index.php/Flags)
    • Continents (http://www.academickids.com/encyclopedia/index.php/Continents)
  • History (http://www.academickids.com/encyclopedia/index.php/History)
    • Ancient Civilizations (http://www.academickids.com/encyclopedia/index.php/Ancient_Civilizations)
    • Industrial Revolution (http://www.academickids.com/encyclopedia/index.php/Industrial_Revolution)
    • Middle Ages (http://www.academickids.com/encyclopedia/index.php/Middle_Ages)
    • Prehistory (http://www.academickids.com/encyclopedia/index.php/Prehistory)
    • Renaissance (http://www.academickids.com/encyclopedia/index.php/Renaissance)
    • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
    • United States (http://www.academickids.com/encyclopedia/index.php/United_States)
    • Wars (http://www.academickids.com/encyclopedia/index.php/Wars)
    • World History (http://www.academickids.com/encyclopedia/index.php/History_of_the_world)
  • Human Body (http://www.academickids.com/encyclopedia/index.php/Human_Body)
  • Mathematics (http://www.academickids.com/encyclopedia/index.php/Mathematics)
  • Reference (http://www.academickids.com/encyclopedia/index.php/Reference)
  • Science (http://www.academickids.com/encyclopedia/index.php/Science)
    • Animals (http://www.academickids.com/encyclopedia/index.php/Animals)
    • Aviation (http://www.academickids.com/encyclopedia/index.php/Aviation)
    • Dinosaurs (http://www.academickids.com/encyclopedia/index.php/Dinosaurs)
    • Earth (http://www.academickids.com/encyclopedia/index.php/Earth)
    • Inventions (http://www.academickids.com/encyclopedia/index.php/Inventions)
    • Physical Science (http://www.academickids.com/encyclopedia/index.php/Physical_Science)
    • Plants (http://www.academickids.com/encyclopedia/index.php/Plants)
    • Scientists (http://www.academickids.com/encyclopedia/index.php/Scientists)
  • Social Studies (http://www.academickids.com/encyclopedia/index.php/Social_Studies)
    • Anthropology (http://www.academickids.com/encyclopedia/index.php/Anthropology)
    • Economics (http://www.academickids.com/encyclopedia/index.php/Economics)
    • Government (http://www.academickids.com/encyclopedia/index.php/Government)
    • Religion (http://www.academickids.com/encyclopedia/index.php/Religion)
    • Holidays (http://www.academickids.com/encyclopedia/index.php/Holidays)
  • Space and Astronomy
    • Solar System (http://www.academickids.com/encyclopedia/index.php/Solar_System)
    • Planets (http://www.academickids.com/encyclopedia/index.php/Planets)
  • Sports (http://www.academickids.com/encyclopedia/index.php/Sports)
  • Timelines (http://www.academickids.com/encyclopedia/index.php/Timelines)
  • Weather (http://www.academickids.com/encyclopedia/index.php/Weather)
  • US States (http://www.academickids.com/encyclopedia/index.php/US_States)

Information

  • Home Page (http://academickids.com/encyclopedia/index.php)
  • Contact Us (http://www.academickids.com/encyclopedia/index.php/Contactus)

  • Clip Art (http://classroomclipart.com)
Toolbox
Personal tools