Applications generated by Free Pascal might generate run-time errors when certain abnormal conditions are detected in the application. This appendix lists the possible run-time errors and gives information on why they might be produced. 1 Invalid function number An invalid operating system call was attempted.
Paradigm | |
---|---|
Designed by | Niklaus Wirth |
First appeared | 1970; 49 years ago |
Typing discipline | |
Filename extensions | .pp , .pas , .inc , |
Major implementations | |
Dialects | |
Influenced by | |
ALGOL W | |
Influenced | |
|
Pascal is an imperative and proceduralprogramming language, designed by Niklaus Wirth as a small, efficient language intended to encourage good programming practices using structured programming and data structuring. It is named in honor of the French mathematician, philosopher and physicist Blaise Pascal.
Pascal was developed on the pattern of the ALGOL 60 language. Wirth was involved in the process to improve the language as part of the ALGOL X efforts and proposed a version known as ALGOL W. This was not accepted, and the ALGOL X process bogged down. In 1968, Wirth decided to abandon the ALGOL X process and further improve ALGOL W, releasing this as Pascal in 1970.
Pascal became very successful in the 1970s, notably on the burgeoning minicomputer market. Compilers were also available for many microcomputers as the field emerged in the late 1970s. It was widely used as a teaching language in university-level programming courses in the 1980s, and also used in production settings for writing commercial software during the same period. It was displaced by the C programming language during the late 1980s and early 1990s as UNIX-based systems became popular, and especially with the release of C++.
A derivative known as Object Pascal designed for object-oriented programming was developed in 1985; this was used by Apple Computer and Borland in the late 1980s and later developed into Delphi on the Microsoft Windows platform. Extensions to the Pascal concepts led to the languages Modula-2 and Oberon.
- 1History
- 3Implementations
- 4Language constructs
- 5Resources
- 6Standards
- 6.3Variations
- 7Reception
History[edit]
Earlier efforts[edit]
Much of the history of computer language design during the 1960s can be traced to the ALGOL 60 language. ALGOL was developed during the 1950s with the explicit goal to be able to clearly describe algorithms. It included a number of features for structured programming that remain common in languages to this day.
Shortly after its introduction, in 1962 Wirth began working on his dissertation with Helmut Weber on the Euler programming language. Euler was based on ALGOL's syntax and many concepts but was not a derivative. Its primary goal was to add dynamic lists and types, allowing it to be used in roles similar to Lisp. The language was published in 1965.
By this time, a number of problems in ALGOL had been identified, notably the lack of a standardized string system. The group tasked with maintaining the language had begun the ALGOL X process to identify improvements, calling for submissions. Wirth and Tony Hoare submitted a conservative set of modifications to add strings and clean up some of the syntax. These were considered too minor to be worth using as the new standard ALGOL, so Wirth wrote a compiler for the language, which became known as ALGOL W.
The ALGOL X efforts would go on to choose a dramatically more complex language, ALGOL 68. The complexity of this language led to considerable difficulty producing high-performance compilers, and it was not widely used in the industry. This left an opening for newer languages.
Pascal[edit]
Pascal was influenced by the ALGOL W efforts, with the explicit goals of producing a language that would be efficient both in the compiler and at run-time, allow for the development of well-structured programs, and to be useful for teaching students structured programming.[4] A generation of students used Pascal as an introductory language in undergraduate courses.
One of the early successes for language was the introduction of UCSD Pascal, a version that ran on a custom operating system that could be ported to different platforms. A key platform was the Apple II, where it saw widespread use. This led to the use of Pascal becoming the primary high-level language used for development in the Apple Lisa, and later, the Macintosh. Parts of the original Macintosh operating system were hand-translated into Motorola 68000assembly language from the Pascal sources.[5]
The typesetting system TeX by Donald E. Knuth was written in WEB, the original literate programming system, based on DECPDP-10 Pascal. Successful commercial applications like Adobe Photoshop[6] were written in Macintosh Programmer's Workshop Pascal, while applications like Total Commander, Skype[citation needed] and Macromedia Captivate were written in Delphi (Object Pascal). Apollo Computer used Pascal as the systems programming language for its operating systems beginning in 1980.
Variants of Pascal have also been used for everything from research projects to PC games and embedded systems. Newer Pascal compilers exist which are widely used.[7]
Object Pascal[edit]
During work on the Lisa, Larry Tesler began corresponding with Wirth on the idea of adding object oriented extensions to the language. This led initially to Clascal, introduced in 1983. As the Lisa program faded and was replaced by the Mac, a further version known as Object Pascal was created. This was introduced on the Macintosh in 1985 as part of the MacAppapplication framework, and became Apple's primary development language into the early 1990s.
The Object Pascal extensions were added to Turbo Pascal with the release of version 5.5 in 1989.[8] Over the years, Object Pascal became the basis of the Delphi system for Microsoft Windows, which is still used for developing Windows applications, and can cross-compile code to other systems. Free Pascal is an open source, cross-platform alternative.
In addition, you can Test the skin but do not need to use software that can still skin test extremely convenient and safe.Guidance Software Use Test Skin LoL Pro 2017 Skin Preview. If you are looking to buy a Skin without knowing Its shape or you want to experience the use of Skin when no money to pay for it now, we are sure 'Skin Preview' be a Software that it will meet all of what you need.This is a Test Skin free program name LOL PRO (LOL SKIN). Lol skins download. Program helps you change Champion Skin in the game League of Legends is easy and fast.
Brief description[edit]
Wirth's intention was to create an efficient language (regarding both compilation speed and generated code) based on structured programming, a recently popularized concept that he promoted in his book Algorithms + Data Structures = Programs. Pascal has its roots in the ALGOL 60 language, but also introduced concepts and mechanisms which (on top of ALGOL's scalars and arrays) enabled programmers to define their own complex (structured) datatypes, and also made it easier to build dynamic and recursive data structures such as lists, trees and graphs. Important features included for this were records, enumerations, subranges, dynamically allocated variables with associated pointers, and sets. To make this possible and meaningful, Pascal has a strong typing on all objects, which means that one type of data cannot be converted or interpreted as another without explicit conversions. Similar mechanisms are standard in many programming languages today. Other languages that influenced Pascal's development were Simula 67 and Wirth's own ALGOL W.
Pascal, like many programming languages of today (but unlike most languages in the C family), allows nested procedure definitions to any level of depth, and also allows most kinds of definitions and declarations inside subroutines (procedures and functions). This enables a very simple and coherent syntax where a complete program is syntactically nearly identical to a single procedure or function (except for the heading, which has one of these three keywords).
Implementations[edit]
Early Pascal compilers[edit]
The first Pascal compiler was designed in Zürich for the CDC 6000 seriesmainframe computer family. Niklaus Wirth reports that a first attempt to implement it in Fortran in 1969 was unsuccessful due to Fortran's inadequacy to express complex data structures. The second attempt was implemented in a C-like language (Scallop by Max Engeli) and then translated by hand (by R. Schild) to Pascal itself for boot-strapping.[9] It was operational by mid-1970. Many Pascal compilers since have been similarly self-hosting, that is, the compiler is itself written in Pascal, and the compiler is usually capable of recompiling itself when new features are added to the language, or when the compiler is to be ported to a new environment. The GNU Pascal compiler is one notable exception, being written in C.
The first successful port of the CDC Pascal compiler to another mainframe was completed by Welsh and Quinn at the Queen's University of Belfast (QUB) in 1972. The target was the ICL1900 series. This compiler, in turn, was the parent of the Pascal compiler for the Information Computer Systems (ICS) Multum minicomputer. The Multum port was developed – with a view to using Pascal as a systems programming language – by Findlay, Cupples, Cavouras and Davis, working at the Department of Computing Science in Glasgow University. It is thought that Multum Pascal, which was completed in the summer of 1973, may have been the first 16-bit implementation.
A completely new compiler was completed by Welsh et al. at QUB in 1977. It offered a source-language diagnostic feature (incorporating profiling, tracing and type-aware formatted postmortem dumps) that was implemented by Findlay and Watt at Glasgow University. This implementation was ported in 1980 to the ICL 2900 series by a team based at Southampton University and Glasgow University. The Standard Pascal Model Implementation was also based on this compiler, having been adapted, by Welsh and Hay at Manchester University in 1984, to check rigorously for conformity to the BSI 6192/ISO 7185 Standard and to generate code for a portable abstract machine.
The first Pascal compiler written in North America was constructed at the University of Illinois under Donald B. Gillies for the PDP-11 and generated native machine code.
The Pascal-P system[edit]
To propagate the language rapidly, a compiler 'porting kit' was created in Zurich that included a compiler that generated code for a 'virtual' stack machine, i.e., code that lends itself to reasonably efficient interpretation, along with an interpreter for that code – the Pascal-P system. The P-system compilers were termed Pascal-P1, Pascal-P2, Pascal-P3, and Pascal-P4. Pascal-P1 was the first version, and Pascal-P4 was the last to come from Zurich. The version termed Pascal-P1 was coined after the fact for the many different sources for Pascal-P that existed. The compiler was redesigned to enhance portability, and issued as Pascal-P2. This code was later enhanced to become Pascal-P3, with an intermediate code backward compatible with Pascal-P2, and Pascal-P4, which was not backward compatible.
The Pascal-P4 compiler/interpreter can still be run and compiled on systems compatible with original Pascal. However, it only accepts a subset of the Pascal language.
Pascal-P5, created outside the Zurich group, accepts the full Pascal language and includes ISO 7185 compatibility.
UCSD Pascal branched off Pascal-P2, where Kenneth Bowles utilized it to create the interpretiveUCSD p-System. The UCSD p-System was one of three operating systems available at the launch of the original IBM Personal Computer.[10] UCSD Pascal used an intermediate code based on byte values, and thus was one of the earliest 'byte code compilers'. Pascal-P1 through Pascal-P4 was not, but rather based on the CDC 6600 60 bit word length.
A compiler based on the Pascal-P4 compiler, which created native binaries, was released for the IBM System/370mainframe computer by the Australian Atomic Energy Commission; it was called the 'AAEC Pascal Compiler' after the abbreviation of the name of the Commission.[11]
Object Pascal and Turbo Pascal[edit]
Apple Computer created its own Lisa Pascal for the Lisa Workshop in 1982, and ported the compiler to the Apple Macintosh and MPW in 1985. In 1985 Larry Tesler, in consultation with Niklaus Wirth, defined Object Pascal and these extensions were incorporated in both the Lisa Pascal and Mac Pascal compilers.
In the 1980s, Anders Hejlsberg wrote the Blue Label Pascal compiler for the Nascom-2. A reimplementation of this compiler for the IBM PC was marketed under the names Compas Pascal and PolyPascal before it was acquired by Borland and renamed Turbo Pascal.
Turbo Pascal became hugely popular, thanks to an aggressive pricing strategy, having one of the first full-screen IDEs, and very fast turnaround time (just seconds to compile, link, and run). It was written and highly optimized entirely in assembly language, making it smaller and faster than much of the competition.
In 1986, Anders ported Turbo Pascal to the Macintosh and incorporated Apple's Object Pascal extensions into Turbo Pascal. These extensions were then added back into the PC version of Turbo Pascal for version 5.5. At the same time Microsoft also implemented the Object Pascal compiler.[12][13] Turbo Pascal 5.5 had a large influence on the Pascal community, which began concentrating mainly on the IBM PC in the late 1980s. Many PC hobbyists in search of a structured replacement for BASIC used this product. It also began to be adopted by professional developers. Around the same time a number of concepts were imported from C to let Pascal programmers use the C-based API of Microsoft Windows directly. These extensions included null-terminated strings, pointer arithmetic, function pointers, an address-of operator and unsafe typecasts.
Turbo Pascal, and other derivatives with units or module concepts are modular languages. However, it does not provide a nested module concept or qualified import and export of specific symbols.
Other variants[edit]
Super Pascal is a variant that added non-numeric labels, a return statement and expressions as names of types.
TMT Pascal was the first Borland-compatible compiler for 32-bit DOS protected mode, OS/2 and Win32 operating systems. The TMT Pascal language was the first one to allow function and operator overloading.
The universities of Wisconsin-Madison, Zürich, Karlsruhe and Wuppertal developed the Pascal-SC[14][15] and Pascal-XSC[16][17][18] (Extensions for Scientific Computation) compilers, aimed at programming numerical computations. Development for Pascal-SC started in 1978 supporting ISO 7185 Pascal level 0, but level 2 support was added at a later stage.[19] Pascal-SC originally targeted the Z80 processor, but was later rewritten for DOS (x86) and 68000. Pascal-XSC has at various times been ported to Unix (Linux, SunOS, HP-UX, AIX) and Microsoft/IBM (DOS with EMX, OS/2, Windows) operating systems. It operates by generating intermediate C source code which is then compiled to a native executable. Some of the Pascal-SC language extensions have been adopted by GNU Pascal.
Pascal Sol was designed around 1983 by a French team to implement a Unix-like systems named Sol. It was standard Pascal level-1 (with parametrized array bounds) but the definition allowed alternative keywords and predefined identifiers in French and the language included a few extensions to ease system programming (e.g. an equivalent to lseek).[20] The Sol team later on moved to the ChorusOS project to design a distributed operating system.[21]
IP Pascal was an implementation of the Pascal programming language using Micropolis DOS, but was moved rapidly to CP/M-80 running on the Z80. It was moved to the 80386 machine types in 1994, and exists today as Windows/XP and Linux implementations. In 2008, the system was brought up to a new level and the resulting language termed 'Pascaline' (after Pascal's calculator). It includes objects, namespace controls, dynamic arrays, along with many other extensions, and generally features the same functionality and type protection as C#. It is the only such implementation that is also compatible with the original Pascal implementation, which is standardized as ISO 7185.
Language constructs[edit]
Pascal, in its original form, is a purely procedural language and includes the traditional array of ALGOL-like control structures with reserved words such as if, then, else, while, for, and case ranging on a single statement or a begin-end statements block. Pascal also has data structuring constructs not included in the original ALGOL 60types, like records, variants, pointers, enumerations, and sets and procedure/pointers. Such constructs were in part inherited or inspired from Simula 67, ALGOL 68, Niklaus Wirth's own ALGOL W and suggestions by C. A. R. Hoare.
Pascal programs start with the programkeyword with a list of external file descriptors as parameters[22] (not required in Turbo Pascal etc.); then follows the main block bracketed by the begin and end keywords. Semicolons separate statements, and the full stop (i.e., a period) ends the whole program (or unit). Letter case is ignored in Pascal source.
Here is an example of the source code in use for a very simple 'Hello, World!' program:
Metric Conversion calculator is an intuitive and extremely easy to use calculator to convert the following measures listed below from international metric system (SI) to U.S. And/or British metric. Metric unit converter download.
Data types[edit]
A type in Pascal, and in several other popular programming languages, defines a variable in such a way that it defines a range of values which the variable is capable of storing, and it also defines a set of operations that are permissible to be performed on variables of that type. The predefined types are:
Data type | Type of values which the variable is capable of storing |
---|---|
integer | integer (whole) numbers |
real | floating-point numbers |
boolean | the values True or False |
char | a single character from an ordered character set |
string | a sequence or 'string' of characters |
set | equivalent to an array of boolean values |
The range of values allowed for each (except boolean) is implementation defined. Functions are provided for some data conversions. For conversion of
real
to integer
, the following functions are available: round
(which rounds to integer using banker's rounding) and trunc
(rounds towards zero).Free Pascal Exit Code 2
The programmer has the freedom to define other commonly used data types (e.g. byte, string, etc.) in terms of the predefined types using Pascal's type declaration facility, for example
(Often-used types like byte and string are already defined in many implementations.)
Subrange types[edit]
Subranges of any ordinal data type (any simple type except real) can also be made:
Set types[edit]
In contrast with other programming languages from its time,[citation needed] Pascal supports a set type:
A set is a fundamental concept for modern mathematics, and they may be used in many algorithms. Such a feature is useful and may be faster than an equivalent construct in a language that does not support sets. For example, for many Pascal compilers:
executes faster than:
Sets of non-contiguous values can be particularly useful, in terms of both performance and readability:
For these examples, which involve sets over small domains, the improved performance is usually achieved by the compiler representing set variables as bit vectors. The set operators can then be implemented efficiently as bitwise machine code operations.
Type declarations[edit]
Types can be defined from other types using type declarations:
Further, complex types can be constructed from simple types:
File type[edit]
As shown in the example above, Pascal files are sequences of components. Every file has a buffer variable which is denoted by f^. The procedures get (for reading) and put (for writing) move the buffer variable to the next element. Read is introduced such that read(f, x) is the same as x := f^; get(f);. Write is introduced such that write(f, x) is the same as f^ := x; put(f); The type text is predefined as file of char. While the buffer variable could be used for inspecting the next character to be used (check for a digit before reading an integer), this leads to serious problems with interactive programs in early implementations, but was solved later with the 'lazy I/O' concept.
In Jensen & Wirth Pascal, strings are represented as packed arrays of chars; they therefore have fixed length and are usually space-padded.
Pointer types[edit]
Pascal supports the use of pointers:
Here the variable NodePtr is a pointer to the data type Node, a record. Pointers can be used before they are declared. This is a forward declaration, an exception to the rule that things must be declared before they are used.
To create a new record and assign the value 10 and character A to the fields a and b in the record, and to initialise the pointer c to the null pointer ('NIL' in Pascal), the statements would be:
This could also be done using the with statement, as follows:
Inside of the scope of the with statement, a and b refer to the subfields of the record pointer NodePtr and not to the record Node or the pointer type pNode.
Linked lists, stacks and queues can be created by including a pointer type field (c) in the record.
Unlike many languages that feature pointers, Pascal only allows pointers to reference dynamically created variables that are anonymous, and does not allow them to reference standard static or local variables. Pointers also must have an associated type, and a pointer to one type is not compatible with a pointer to another type (e.g. a pointer to a char is not compatible with a pointer to an integer). This helps eliminate the type security issues inherent with other pointer implementations, particularly those used for PL/I or C. It also removes some risks caused by dangling pointers, but the ability to dynamically deallocate referenced space by using the dispose function (which has the same effect as the free library function found in C) means that the risk of dangling pointers has not been entirely eliminated[23] as it has in languages such as Java and C#, which provide automatic garbage collection (but which do not entirely eliminate the related problem of memory leaks).
Some of these restrictions can be lifted in newer dialects.
Control structures[edit]
Pascal is a structured programming language, meaning that the flow of control is structured into standard statements, usually without 'goto' commands.
Procedures and functions[edit]
Pascal structures programs into procedures and functions.
Procedures and functions can be nested to any depth, and the 'program' construct is the logical outermost block.
By default, parameters are passed by value. If 'var' precedes a parameter's name, it is passed by reference.
Each procedure or function can have its own declarations of goto labels, constants, types, variables, and other procedures and functions, which must all be in that order.This ordering requirement was originally intended to allow efficient single-pass compilation. However, in some dialects (such as Embarcadero Delphi) the strict ordering requirement of declaration sections has been relaxed.
Semicolons as statement separators[edit]
Pascal adopted many language syntax features from the ALGOL language, including the use of a semicolon as a statement separator. This is in contrast to other languages, such as PL/I, C etc. which use the semicolon as a statement terminator. No semicolon is needed before the end keyword of a record type declaration, a block, or a case statement; before the until keyword of a repeat statement; and before the else keyword of an if statement.
The presence of an extra semicolon was not permitted in early versions of Pascal. However, the addition of ALGOL-like empty statements in the 1973 Revised Report and later changes to the language in ISO 7185:1983 now allow for optional semicolons in most of these cases. A semicolon is still not permitted immediately before the else keyword in an if statement, because the else follows a single statement, not a statement sequence. In the case of nested ifs, a semicolon cannot be used to avoid the dangling else problem (where the inner if does not have an else, but the outer if does) by putatively terminating the nested if with a semicolon – this instead terminates both if clauses. Instead, an explicit
begin..end
block must be used.[24]Resources[edit]
Compilers and interpreters[edit]
Several Pascal compilers and interpreters are available for general use:
- Delphi is Embarcadero's (formerly Borland/CodeGear) flagship rapid application development (RAD) product. It uses the Object Pascal language (termed 'Delphi' by Borland), descended from Pascal, to create applications for Windows, macOS, iOS, and Android. The .NET support that existed from D8 through D2005, D2006 and D2007 has been terminated, and replaced by a new language (Prism, which is rebranded Oxygene, see below) that is not fully backward compatible. In recent years Unicode support and generics were added (D2009, D2010, Delphi XE).
- Free Pascal is a multi-platform compiler written in Object Pascal (and is self-hosting). It is aimed at providing a convenient and powerful compiler, both able to compile legacy applications and to be the means of developing new ones. It is distributed under the GNU GPL, while packages and runtime library come under a modified GNU LGPL. Apart from compatibility modes for Turbo Pascal, Delphi and Mac Pascal, it also has its own procedural and object-oriented syntax modes with support for extended features such as operator overloading. It supports many platforms and operating systems. Current versions also feature an ISO mode.
- Modern Pascal is a multi-platform interpreter and p-code compiler written in Free Pascal. It is aimed at providing alternative solutions for PHP and node.js, using either an ISO standard pascal dialect or a hybrid supporting JavaScript/C operators. From the CLI it is useful as a Free Pascal interpreter.
- Turbo51 is a free Pascal compiler for the 8051 family of microcontrollers, with Turbo Pascal 7 syntax.
- Oxygene (formerly known as Chrome) is an Object Pascal compiler for the .NET and Mono platforms. It was created and is sold by RemObjects Software, and sold for a while by Embarcadero as the backend compiler of Prism.
- Kylix was a descendant of Delphi, with support for the Linux operating system and an improved object library. It is no longer supported. Compiler and IDE are available now for non-commercial use.
- GNU Pascal Compiler (GPC) is the Pascal compiler of the GNU Compiler Collection (GCC). The compiler itself is written in C, the runtime library mostly in Pascal. Distributed under the GNU General Public License, it runs on many platforms and operating systems. It supports the ANSI/ISO standard languages and has partial Turbo Pascal dialect support. One of the more painful omissions is the absence of a 100% Turbo Pascal-compatible (short)string type. Support for Borland Delphi and other language variations is quite limited. There is some support for Mac-pascal however.
- Virtual Pascal was created by Vitaly Miryanov in 1995 as a native OS/2 compiler compatible with Borland Pascal syntax. Then, it had been commercially developed by fPrint, adding Win32 support, and in 2000 it became freeware. Today it can compile for Win32, OS/2 and Linux, and is mostly compatible with Borland Pascal and Delphi. Development was canceled on April 4, 2005.
- P4 compiler, the basis for many subsequent Pascal-implemented-in-Pascal compilers. It implements a subset of full Pascal.
- P5 compiler, is an ISO 7185 (full Pascal) adaption of P4.
- Smart Mobile Studio is a Pascal to HTML5/Javascript compiler
- Turbo Pascal was the dominant Pascal compiler for PCs during the 1980s and early 1990s, popular both because of its powerful extensions and extremely short compilation times. Turbo Pascal was compactly written and could compile, run, and debug all from memory without accessing disk. Slow floppy disk drives were common for programmers at the time, further magnifying Turbo Pascal's speed advantage. Currently, older versions of Turbo Pascal (up to 5.5) are available for free download from Borland's site.
- IP Pascal Implements the language 'Pascaline' (named after Pascal's calculator), which is a highly extended Pascal compatible with original Pascal according to ISO 7185. It features modules with namespace control, including parallel tasking modules with semaphores, objects, dynamic arrays of any dimensions that are allocated at runtime, overloads, overrides, and many other extensions. IP Pascal has a built-in portability library that is custom tailored to the Pascal language. For example, a standard text output application from 1970's original Pascal can be recompiled to work in a window and even have graphical constructs added.
- Pascal-XT was created by Siemens for their mainframe operating systems BS2000 and SINIX.
- PocketStudio is a Pascal subset compiler and RAD tool for Palm OS and MC68xxx processors with some own extensions to assist interfacing with the Palm OS API. It resembles Delphi and Lazarus with a visual form designer, an object inspector and a source code editor.
- MIDletPascal – A Pascal compiler and IDE that generates small and fast Java bytecode specifically designed to create software for mobiles
- Vector Pascal Vector Pascal is a language for SIMD instruction sets such as the MMX and the AMD 3d Now, supporting all Intel and AMD processors, and Sony's PlayStation 2 Emotion Engine.
- Morfik Pascal allows the development of Web applications entirely written in Object Pascal (both server and browser side).
- WDSibyl – Visual Development Environment and Pascal compiler for Win32 and OS/2
- PP Compiler, a compiler for Palm OS that runs directly on the handheld computer.
- CDC 6000 Pascal compiler is the source code for the first (CDC 6000) Pascal compiler.
- Pascal-S[25]
- AmigaPascal is a free Pascal compiler for the Amiga computer.
IDEs[edit]
- Dev-Pascal is a Pascal IDE that was designed in Borland Delphi and which supports Free Pascal and GNU Pascal as backends.
- Lazarus is a free Delphi-like visual cross-platform IDE for rapid application development (RAD). Based on Free Pascal, Lazarus is available for numerous platforms including Linux, FreeBSD, macOS and Microsoft Windows.
Libraries[edit]
- WOL Library for creating GUI applications with the Free Pascal Compiler.
Standards[edit]
ISO/IEC 7185:1990 Pascal[edit]
In 1983, the language was standardized, in the international standard IEC/ISO 7185,[26] and several local country specific standards, including the American ANSI/IEEE770X3.97-1983, and ISO 7185:1983. These two standards differed only in that the ISO standard included a 'level 1' extension for conformant arrays (an array where the boundaries of the array are not known until run time), where ANSI did not allow for this extension to the original (Wirth version) language. In 1989, ISO 7185 was revised (ISO 7185:1990) to correct various errors and ambiguities found in the original document.
The ISO 7185 was stated to be a clarification of Wirth's 1974 language as detailed by the User Manual and Report [Jensen and Wirth], but was also notable for adding 'Conformant Array Parameters' as a level 1 to the standard, level 0 being Pascal without conformant arrays. This addition was made at the request of C. A. R. Hoare, and with the approval of Niklaus Wirth. The precipitating cause was that Hoare wanted to create a Pascal version of the (NAG) Numerical Algorithms Library, which had originally been written in FORTRAN, and found that it was not possible to do so without an extension that would allow array parameters of varying size. Similar considerations motivated the inclusion in ISO 7185 of the facility to specify the parameter types of procedural and functional parameters.
Niklaus Wirth himself referred to the 1974 language as 'the Standard', for example, to differentiate it from the machine specific features of the CDC 6000 compiler. This language was documented in The Pascal Report,[27] the second part of the 'Pascal users manual and report'.
On the large machines (mainframes and minicomputers) Pascal originated on, the standards were generally followed. On the IBM PC, they were not. On IBM PCs, the Borland standards Turbo Pascal and Delphi have the greatest number of users. Thus, it is typically important to understand whether a particular implementation corresponds to the original Pascal language, or a Borland dialect of it.
The IBM PC versions of the language began to differ with the advent of UCSD Pascal, an interpreted implementation that featured several extensions to the language, along with several omissions and changes. Many UCSD language features survive today, including in Borland's dialect.
ISO/IEC 10206:1990 Extended Pascal[edit]
In 1990, an extended Pascal standard was created as ISO/IEC 10206,[28] which is identical in technical content[29] to IEEE/ANSI 770X3.160-1989[30]As of 2019, Support of Extended Pascal in FreePascal Compiler is planned.[31]
Variations[edit]
Niklaus Wirth's Zurich version of Pascal was issued outside ETH in two basic forms, the CDC 6000 compiler source, and a porting kit called Pascal-P system. The Pascal-P compiler left out several features of the full language that were not required to bootstrap the compiler. For example, procedures and functions used as parameters, undiscriminated variant records, packing, dispose, interprocedural gotos and other features of the full compiler were omitted.
UCSD Pascal, under Professor Kenneth Bowles, was based on the Pascal-P2 kit, and consequently shared several of the Pascal-P language restrictions. UCSD Pascal was later adopted as Apple Pascal, and continued through several versions there. Although UCSD Pascal actually expanded the subset Pascal in the Pascal-P kit by adding back standard Pascal constructs, it was still not a complete standard installation of Pascal.
In the early 1990s, Alan Burns and Geoff Davies developed Pascal-FC, an extension to Pl/0 (from the Niklaus' book 'Algorithms+Data Structures=Programs'). Several constructs were added to use Pascal-FC as a teaching tool for Concurrent Programming (such as semaphores, monitors, channels, remote-invocation and resources). To be able to demonstrate concurrency, the compiler output (a kind of P-code) could then be executed on a virtual machine. This virtual machine not only simulated a normal – fair – environment, but could also simulate extreme conditions (unfair mode).
Borland-like Pascal compilers[edit]
Borland's Turbo Pascal, written by Anders Hejlsberg, was written in assembly language independent of UCSD or the Zurich compilers. However, it adopted much of the same subset and extensions as the UCSD compiler. This is probably because the UCSD system was the most common Pascal system suitable for developing applications on the resource-limited microprocessor systems available at that time.
The shrink-wrapped Turbo Pascal version 3 and later incarnations, including Borland's Object Pascal and Delphi and non-Borland near-compatibles became popular with programmers including shareware authors, and so the SWAG library of Pascal code features a large amount of code written with such versions as Delphi in mind.
Software products (compilers, and IDE/Rapid Application Development (RAD) in this category:
- Turbo Pascal - 'TURBO.EXE' up to version 7, and Turbo Pascal for Windows ('TPW') and Turbo Pascal for Macintosh.
- Borland Pascal 7 (essentially Turbo Pascal 7 for Windows).
- Object Pascal - an extension of the Pascal language that was developed at Apple Computer by a team led by Larry Tesler in consultation with Niklaus Wirth, the inventor of Pascal; its features were added to Borland's Turbo Pascal for Macintosh and in 1989 for Turbo Pascal 5.5 for DOS.
- Delphi - Object Pascal is essentially its underlying language.
- Free Pascal compiler (FPC) - Free Pascal adopted the de facto standard dialect of Pascal programmers, Borland Pascal and, later, Delphi.
- PascalABC.NET - is a new generation Pascal programming language including compiler and IDE
- Borland Kylix is a compiler and IDE formerly sold by Borland, but later discontinued. It is a Linux version of the Borland Delphi software development environment and C++Builder.
- Lazarus - similar to Kylix in function, is a free cross-platform visual IDE for RAD using the Free Pascal compiler, which supports dialects of Object Pascal, to varying degrees.
- Virtual Pascal - VP2/1 is a fully Borland Pascal and Borland Delphi compatible 32-bit Pascal compiler for OS/2 and Win 32 (with a Linux version 'on the way').[32]
- Sybil is an open source Delphi-like IDE and compiler; implementations include WDSibyl[33] for Microsoft Windows and OS/2, a commercial Borland Pascal compatible environment released by a company called Speedsoft that was later developed into a Delphi like RAD environment called Sybil and then open sourced under the GPL when that company closed down; Open Sybil is an ongoing project, an Open source Pascal RAD (Rapid Application Development) Tool for OS/2 and eCS that was originally based on Speedsoft's WDsybl SPCC (Sibyl Portable Component Classes) and SVDE (Sibyl Visual Development Tool) sources but now the core is SOM, WPS and OpenDoc.[34]
List of related standards[edit]
- ISO 8651-2:1988 Information processing systems – Computer graphics – Graphical Kernel System (GKS) language bindings – Part 2: Pascal
Reception[edit]
Pascal generated a wide variety of responses in the computing community, both critical and complimentary.
Early criticism[edit]
While very popular in the 1980s and early 1990s, implementations of Pascal that closely followed Wirth's initial definition of the language were widely criticized as being unsuitable for use outside teaching. Brian Kernighan, who popularized the C language, outlined his most notable criticisms of Pascal as early as 1981 in his article 'Why Pascal is Not My Favorite Programming Language'.[35] The most serious problem described by him was that array sizes and string lengths were part of the type, so it was not possible to write a function that would accept variable-length arrays or even strings as parameters. This made it unfeasible to write, for example, a sorting library. Kernighan also criticized the unpredictable order of evaluation of boolean expressions, poor library support, and lack of static variables, and raised a number of smaller issues. Also, he stated that the language did not provide any simple constructs to 'escape' (knowingly and forcibly ignore) restrictions and limitations. More general complaints from other sources[23][36] noted that the scope of declarations was not clearly defined in the original language definition, which sometimes had serious consequences when using forward declarations to define pointer types, or when record declarations led to mutual recursion, or when an identifier may or may not have been used in an enumeration list. Another difficulty was that, like ALGOL 60, the language did not allow procedures or functions passed as parameters to predefine the expected type of their parameters.
Most of Kernighan's criticisms were directly addressed in the article 'The Pascal Programming Language' by Bill Catambay,[37] specifically, under 'Myth 6: Pascal Is Not For Serious Programmers'.[38]
Despite initial criticisms, Pascal continued to evolve, and most of Kernighan's points do not apply to versions of the language which were enhanced to be suitable for commercial product development, such as Borland's Turbo Pascal. As Kernighan predicted in his article, most of the extensions to fix these issues were incompatible from compiler to compiler. Since the early 1990s, however, most of the varieties seem condensed into two categories: ISO and Borland-like.
Extended Pascal addresses many of these early criticisms. It supports variable-length strings, variable initialization, separate compilation, short-circuit boolean operators, and default (
otherwise
) clauses for case statements.[39]See also[edit]
References[edit]
- ^'We looked very carefully at Delphi Object Pascal and built a working prototype of bound method references in order to understand their interaction with the Java programming language and its APIs .. Our conclusion was that bound method references are unnecessary and detrimental to the language. This decision was made in consultation with Borland International, who had previous experience with bound method references in Delphi Object Pascal.' (from About Microsoft's 'Delegates'Archived 2012-06-27 at the Wayback Machine at java.sun.com.
- ^TechMetrix Research (1999). 'History of Java'(PDF). Java Application Servers Report. Archived from the original(PDF) on 2010-12-29.
The project went ahead under the name 'green' and the language was based on an old model of UCSD Pascal, which makes it possible to generate interpretive code
- ^'A Conversation with James Gosling - ACM Queue'. Archived from the original on 16 July 2015. Retrieved 11 August 2015.
- ^Essential PascalArchived 2017-04-18 at the Wayback Machine by Marco Cantù
- ^Hertzfeld, Andy. 'Hungarian folklore.orgArchived 2015-11-18 at the Wayback Machine: Macintosh Stories. Retrieved 2012-03-06.
- ^https://www.computerhistory.org/atchm/adobe-photoshop-source-code/Archived 2014-05-07 at the Wayback Machine, Adobe Photoshop Source Code
- ^tiobe.comArchived 2012-03-15 at the Wayback Machine, Programming Community Index for January 2011.
- ^'Antique Software: Turbo Pascal v5.5'.
- ^Computers and Computing. A Personal Perspective.Archived 2017-05-10 at the Wayback Machine by Niklaus Wirth
- ^cbi.umn.edu, 'An Interview with JOHN BRACKETT AND DOUG ROSS'[permanent dead link], p15, Charles Babbage Institute, 2004
- ^iaea.org, 'AUSTRALIAN ATOMIC ENERGY COMMISSION RESEARCH ESTABLISHMENT, LUCAS HEIGHTS, NUCLEAR SCIENCE AND TECHNOLOGY BRANCH REPORT 1977, DIVISIONAL RESEARCH', p.22, International Atomic Energy Agency (IEAE)
- ^Jon Udell, Crash of the Object-Oriented Pascals, BYTE, July, 1989.
- ^M. I. Trofimov, The End of Pascal?, BYTE, March, 1990, p. 36.
- ^'An introduction to the scientific computing language Pascal-SC'. Computers. 14: 53–69. doi:10.1016/0898-1221(87)90181-7.
- ^PI (1986-08-29). 'Cadmus jetzt mit Kulisch-Arithmetik - Uni Karlsruhe gibt Pascal-Compiler nach München' [Cadmus now comes with Kulisch arithmetic - University Karlsruhe delivers Pascal compiler to Munich]. Computerwoche (in German). Munich / Karlsruhe, Germany: IDG Business Media GmbH. Archived from the original on 2016-05-30. Retrieved 2016-05-30.
- ^'PASCAL-XSC: PASCAL for Extended Scientific Computing'. Archived from the original on 2014-01-05.
- ^'XSC Software'. Archived from the original on 1 November 2015. Retrieved 11 August 2015.
- ^'Universitaet Wuppertal: Wissenschaftliches Rechnen / Softwaretechnologie'. Archived from the original on 6 November 2015. Retrieved 11 August 2015.
- ^Bamberger, Lothar; Davenport, James H.; Fischer, Hans-Christoph; Kok, Jan; Schumacher, Günter; Ullrich, Christian; Wallis, Peter J. L.; Winter, Dik T.; Wolff von Gudenberg, Jürgen (1990). Wallis, Peter J. L. (ed.). Improving Floating-Point Programming (1st ed.). Bath, United Kingdom: John Wiley & Sons Ltd.ISBN0-471-92437-7.
- ^Michel Gien, 'The SOL Operating System', in Usenix Summer '83 Conference, Toronto, ON, (July 1983), pp. 75-78
- ^cs.berkeley.eduArchived 2015-02-07 at the Wayback Machine
- ^Pascal ISO 7185:1990Archived 2012-06-17 at the Wayback Machine 6.10
- ^ abJ. Welsh, W. J. Sneeringer, and C. A. R. Hoare, 'Ambiguities and Insecurities in Pascal', Software Practice and Experience 7, pp. 685–696 (1977)
- ^Pascal, Nell Dale and Chip Weems, 'Dangling Else', p. 160–161Archived 2017-03-18 at the Wayback Machine
- ^'Pascal-S: A Subset and Its Implementation', N. Wirth in Pascal – The Language and Its Implementation, by D.W. Barron, Wiley 1979.
- ^ISO/IEC 7185:1990 Pascal(PDF). Archived(PDF) from the original on 27 January 2016. Retrieved 16 September 2014.
- ^Wirth, Niklaus (July 1973). The Programming Language Pascal (Revised Report)(PDF). ETH Zürich. Archived(PDF) from the original on 15 March 2015. Retrieved 16 September 2014.
- ^Extended Pascal: ISO/IEC 10206:1990. Archived from the original on 2016-03-27. Retrieved 16 September 2014.
- ^'Language standards: Pascal, Extended Pascal, Fortan'. Archived from the original on 2014-07-14. Retrieved 16 September 2014.
- ^770X3.160-1989 - IEEE/ANSI Standard for the Programming Language Extended Pascal. Retrieved 16 September 2014.
- ^http://wiki.freepascal.org/Extended_Pascal
- ^'Virtual Pascal for OS/2'. Archived from the original on 30 August 2011. Retrieved 3 April 2016.
- ^WDSibyl. 'Homepage :: WDSibyl :: Visual Development Environment'. www.wdsibyl.org.
- ^'netlabs.org - Project: Open Sibyl'. Archived from the original on 4 March 2016. Retrieved 3 April 2016.
- ^Brian W. Kernighan (1981). 'Why Pascal is Not My Favorite Programming Language'. Archived 2009-04-28 at the Wayback Machine
- ^O. Lecarme, P. Desjardins, 'More Comments on the Programming Language Pascal', Acta Informatica 4, pp. 231–243 (1975).
- ^Bill Catambay. 'The Pascal Programming Language'. Archived 2008-02-28 at the Wayback Machine
- ^Bill Catambay. 'The Pascal Programming Language', 'Chapter IV. Myths Uncovered'. Archived 2015-09-17 at the Wayback Machine.
- ^'Extended Pascal'. Archived 2015-10-18 at the Wayback Machine.
Further reading[edit]
- Niklaus Wirth: The Programming Language Pascal. 35–63, Acta Informatica, Volume 1, 1971.
- C. A. R. Hoare: 'Notes on data structuring'. In O.-J. Dahl, E. W. Dijkstra and C. A. R. Hoare, editors, Structured Programming, pages 83–174. Academic Press, 1972.
- C. A. R. Hoare, Niklaus Wirth: An Axiomatic Definition of the Programming Language Pascal. 335–355, Acta Informatica, Volume 2, 1973.
- Kathleen Jensen and Niklaus Wirth: PASCAL – User Manual and Report. Springer-Verlag, 1974, 1985, 1991, ISBN0-387-97649-3 and ISBN3-540-97649-3.
- Niklaus Wirth: Algorithms + Data Structures = Programs. Prentice-Hall, 1975, ISBN0-13-022418-9.
- Niklaus Wirth: An assessment of the programming language PASCAL. 23–30 ACM SIGPLAN Notices Volume 10, Issue 6, June 1975.
- N. Wirth, and A. I. Wasserman, ed: Programming Language Design. IEEE Computer Society Press, 1980
- D. W. Barron (Ed.): Pascal – The Language and its Implementation. John Wiley 1981, ISBN0-471-27835-1
- Peter Grogono: Programming in Pascal, Revised Edition, Addison-Wesley, 1980
- Richard S. Forsyth: Pascal in Work and Play, Chapman and Hall, 1982
- N. Wirth, M. Broy, ed, and E. Denert, ed: Pascal and its Successors in Software Pioneers: Contributions to Software Engineering. Springer-Verlag, 2002, ISBN3-540-43081-4
- N. Wirth: Recollections about the Development of Pascal. ACM SIGPLAN Notices, Volume 28, No 3, March 1993.
Free Pascal Error Code 5
Wikimedia Commons has media related to Pascal (programming language). |
Wikibooks has a book on the topic of: Pascal |
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Pascal_(programming_language)&oldid=918133512'
Developer(s) | Florian Klämpfl & volunteers |
---|---|
Initial release | 1997; 22 years ago |
Stable release | 3.0.4 / November 28, 2017; 21 months ago |
Preview release | |
Repository | |
Written in | Object Pascal and Assembly |
Operating system | Cross-platform |
Type | Compiler |
License | GNU General Public License for the compiler and utility executables. GNU General Public License with static linking exception for the runtime, package, component and other libraries that become part of executables created with the compiler |
Website | www.freepascal.org |
Free Pascal Compiler (FPC) is a compiler for the closely related programming-language dialects Pascal and Object Pascal. It is free software released under the GNU General Public License, with exception clauses that allow static linking against its runtime libraries and packages for any purpose in combination with any other software license.
It supports its own Object Pascal dialect, as well as the dialects of several other Pascal family compilers to a certain extent, including those of Turbo Pascal, Delphi, and some historical Macintosh compilers. The dialect is selected on a per-unit (module) basis, and more than one dialect can be used per program.
It follows a write once, compile anywhere philosophy and is available for many CPU architectures and operating systems (see Targets). It supports inline assembly language and includes an internal assembler capable of parsing several dialects such as AT&T and Intel style.
Separate projects exist to facilitate developing cross-platformgraphical user interface (GUI) applications, the most prominent one being the Lazarusintegrated development environment (IDE).
- 2History
- 9External links
Supported dialects[edit]
Initially, Free Pascal adopted the de facto standard dialect of Pascal programmers – Borland Pascal – but later on adopted Delphi. From version 2.0 on, Delphi compatibility has been continuously implemented or improved.
The project has a compilation mode concept, and the developers made it clear that they would incorporate working patches for the standardized dialects of the American National Standards Institute (ANSI) and International Organization for Standardization (ISO) to create a standards-compliant mode.
A small effort has been made to support some of the Apple Pascal syntax to ease interfacing to the Classic Mac OS and macOS. Since the Apple dialect implements some standard Pascal features that Turbo Pascal and Delphi omit, Free Pascal is a bit more ISO-compatible than these.
The 2.2.x release series did not significantly change the dialect objectives beyond roughly Delphi 7 level syntax, instead aiming for closer compatibility. A notable exception to this was the addition of support for generics to Free Pascal in version 2.2.0, several years before they were supported in any capacity by Delphi.
As of 2011, several Delphi 2006-specific features were added in the development branch, and some of the starting work for the features new in Delphi 2009 (most notably the addition of the
UnicodeString
type) was completed. The development branch also features an Objective-Pascal extension for Objective-C (Cocoa) interfacing.As of version 2.7.1, Free Pascal implemented basic ISO Pascal mode, though many things such as
Get
and Put
procedure and file-buffer variable concept for file handling were still absent.As of version 3.0.0, ISO Pascal mode is fairly complete, with one remaining bug that has since been fixed in the trunk branch. It has been able to compile standardpascal.org's P5 ISO Pascal compiler with no changes.
History[edit]
Early years[edit]
Free Pascal was created when Borland clarified that Borland Pascal development for DOS would stop with version 7, to be replaced by a Windows-only product, which later became Delphi.
Student Florian Paul Klämpfl began developing his own compiler written in the Turbo Pascal dialect and produced 32-bit code for the GO32v1 DOS extender, which was used and developed by the DJ's GNU Programming Platform (DJGPP) project at that time.
Originally, the compiler was a 16-bit DOS executable compiled by Turbo Pascal. After two years, the compiler was able to compile itself and became a 32-bit executable.
Expansion[edit]
The initial 32-bit compiler was published on the Internet, and the first contributors joined the project. Later, a Linux port was created by Michael van Canneyt, five years before the Borland Kylix compiler became available.
The DOS port was adapted for use in OS/2 using the Eberhard Mattes eXtender (EMX) which made OS/2 the second supported compiling target. As well as Florian Klämpfl the original author, Daniël Mantione also contributed significantly to make this happen, providing the original port of the run-time library to OS/2 and EMX. The compiler improved gradually, and the DOS version migrated to the GO32v2 extender. This culminated in release 0.99.5, which was much more widely used than prior versions, and was the last release aiming only for Turbo Pascal compliance; later releases added a Delphi compatibility mode. This release was also ported to systems using Motorola 68000 family (m68k) processors.
With release 0.99.8 the Win32 target was added, and a start was made with incorporating some Delphi features. Stabilizing for a non-beta release began, and version 1.0 was released in July 2000. The 1.0.x series was widely used, in business and education. For the 1.0.x releases, the port to 68k CPU was redone, and the compiler produced stable code for several 68k Unix-like and AmigaOS operating systems.
Version 2[edit]
During the stabilization of what would become 1.0.x, and also when porting to the Motorola 68k systems, it was clear that the design of the code generator was far too limited in many aspects. The principal problems were that adding processors 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 difficult to maintain.
For these reasons, the 1.1.x series branched off from the 1.0.x main branch in December 1999. At first, changes were mostly clean-ups and rewrite-redesigns to all parts of the compiler. The code generator and register allocator were also rewritten. Any remaining missing Delphi compatibility was added.
The work on 1.1.x continued slowly but steadily. In late 2003, a working PowerPC port became available, followed by an ARM port in summer 2004, a SPARC port in fall 2004, and an x86-64-AMD64 port 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 numbered 1.9.0. These were quickly followed by versions 1.9.2 and 1.9.4; the latter introduced 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).
Version 2.2.x[edit]
In 2006, some of the major reworks planned for 2.2, such as the rewrite of the unit system, had still not begun, and it was decided to instead start stabilizing the already implemented features.
Some of the motives for this roadmap change were the needs of the Lazarus integrated development environment project, particularly the internal linker, support for Win64, Windows CE, and OS X on x86, and related features like DWARF. After betas 2.1.2 and 2.1.4, version 2.2.0 was released in September 2007, followed by version 2.2.2 in August 2008 and version 2.2.4 in March 2009.
The 2.2.x series vastly improved support for the ActiveX and Component Object Model (COM) interface, and Object Linking and Embedding (OLE), though bugs were still being found. The delegation to interface using the
implements
keyword was partly implemented, but was not complete as of March 2011.[1] Library support for ActiveX was also improved.Another major feature was the internal linker for Win32, Win64, and Windows CE, which greatly improveď linking time and memory use, and make the compile-link-run cycle in Lazarus much faster. The efficiency for smart-linking, or dead code elimination, was also improved.
Minor new features included improved DWARF (2/3) debug format support, and optimizations such as tail recursion, omission of unneeded stack frames and register-based common subexpression elimination (CSE) optimization. A first implementation of generic programming (generics) support also became available, but only experimentally.
Version 2.4.x[edit]
The 2.4.x release series had a less clear set of goals than earlier releases. The unit system rewrite was postponed again, and the branch that became 2.4 was created to keep risky commits from 2.2 to stabilize it. Mostly these risky commits were more involved improvements to the new platforms, Mac PowerPC 64, Mac x86-64, iPhone, and many fixes to the ARM and x86-64 architectures in general, as well as DWARF.
Other compiler improvements included whole program optimization (WPO) and devirtualization and ARM embedded-application binary interface (EABI) support.
Later, during the 2.2 cycle, a more Delphi-like resource support (based on special sections in the binary instead of Pascal constants) was added. This feature, direly needed by Lazarus, became the main highlight of the branch.
Other more minor additions were a memory manager that improved heap manager performance in threaded environments, small improvements in Delphi compatibility such as
OleVariant
, and improvements in interfacedelegation.On January 1, 2010, Free Pascal 2.4.0 was released, followed on November 13, 2010, by bug fix release 2.4.2, with support for
for.in
loops, sealed
and abstract
classes, and other changes.[2]Version 2.6.x[edit]
In January 2012, Free Pascal 2.6 was released. This first version from the 2.6 release series also supported Objective Pascal on OS X and iOS targets and implemented many small improvements and bug fixes. In February 2013, FPC 2.6.2 was released. It contained NetBSD and OpenBSD releases for the first time since 1.0.10, based on fresh ports. In March 2014, the last point release in the 2.6 series, 2.6.4, was launched, featuring mostly database (fcl-db) updates.
Version 3.0.x[edit]
Version 3.0.0 was released on November 25, 2015 and was the first major release since January 1, 2012.It contains many new language features: FPC New Features 3.0
Later releases[edit]
Version 3.0.2 was released on February 15, 2017 and includes bug fixes and minor compiler updates.
Version 3.0.4 was released on November 28, 2017.
It includes many language improvements over previous versions like an internal linker for Executable and Linkable Format (ELF), Arm AARCH64 for iOS and Linux, a revived i8086 platform, extended libraries and much more.
Version 3.0.4 was released on November 28, 2017.
It includes many language improvements over previous versions like an internal linker for Executable and Linkable Format (ELF), Arm AARCH64 for iOS and Linux, a revived i8086 platform, extended libraries and much more.
Targets[edit]
![Free Pascal Code Free Pascal Code](/uploads/1/2/4/8/124808827/130353880.jpg)
Processor architecture | Operating system, device | Version 3.0.0 - 3.3.1 (Trunk) | Version 2.6.2 | Version 2.6.0 | Version 2.4.4 | Version 2.4.2 | Version 2.4.0 | Version 2.2.4 | Version 2.0.x | Version 1.0.x |
---|---|---|---|---|---|---|---|---|---|---|
i386 | DOS (GO32v2extender) | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes |
FreeBSD | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |
OpenBSD | Yes | Yes | No | No | No | No | No | No | Yes | |
NetBSD | Yes | Yes | No | No | No | No | No | No | Yes | |
Linux | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |
macOS | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | No | |
OS/2 | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |
Windows | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |
Windows CE | Yes | Yes | Yes | Yes | Yes | Yes | No | No | No | |
BeOS | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | |
Haiku | Yes | Yes | Yes | Yes | Yes | Yes | No | No | No | |
NetWare | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | |
Solaris | Yes | Yes | Yes | Yes | Yes | No | No | No | Yes | |
iPhone Sim | Yes | Yes | Yes | No | No | No | No | No | No | |
QNX Neutrino | No | No | No | No | No | No | No | No | Yes | |
Android | Yes | Yes | No | No | No | No | No | No | No | |
AROS | Yes | No | No | No | No | No | No | No | No | |
x86-64 | FreeBSD | Yes | Yes | Yes | Yes | Yes | No | No | No | No |
OpenBSD | Yes | Yes | Unknown | Unknown | Unknown | Unknown | Unknown | Unknown | Unknown | |
NetBSD | Yes | Yes | Unknown | Unknown | Unknown | Unknown | Unknown | Unknown | Unknown | |
Linux | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Unknown | No | |
macOS | Yes | Yes | Yes | Yes | Yes | Yes | No | No | No | |
Windows | Yes | Yes | Yes | Yes | Yes | Yes | No | No | No | |
iPhone Sim | Yes | Yes | Yes | No | No | No | No | No | No | |
AROS | Yes | Yes | Yes | Yes | Yes | No | No | No | No | |
Dragonfly | Yes | Yes | Yes | Yes | Yes | No | No | No | No | |
Solaris | Yes | Yes | Yes | Yes | Yes | No | No | No | No | |
Haiku | Yes | No | No | No | No | No | No | No | No | |
ARM | iOS | Yes | Yes | Yes | Yes | Yes | Yes | No | No | No |
Game Boy Advance | Yes | Yes | Yes | Yes | Yes | Yes | No | No | No | |
Nintendo DS | Yes | Yes | Yes | Yes | Yes | Yes | No | No | No | |
Linux | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Unknown | No | |
Windows CE | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Unknown | No | |
Android | Yes | Yes | No | No | No | No | No | No | No | |
Embedded | Yes | Yes | No | No | No | No | No | No | No | |
AArch64 | Linux | Yes | Yes | No | No | No | No | No | No | No |
iOS | Yes | Yes | No | No | No | No | No | No | No | |
Android | Yes | No | No | No | No | No | No | No | No | |
AVR | Embedded | Yes | No | No | No | No | No | No | No | No |
PowerPC | Linux | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No |
macOS | Yes | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | |
Classic Mac OS | Yes | Yes | Yes | Yes | No | No | Yes | Yes | No | |
MorphOS | Yes | Yes | Yes | Yes | Unknown | Unknown | Unknown | Yes | No | |
AIX | Yes | Yes | Yes | No | No | No | No | No | No | |
Wii | Yes | Yes | Yes | Yes | No | No | No | No | No | |
PowerPC 64-bit | Linux | Yes | Yes | Yes | Yes | Yes | Yes | Yes | No | No |
macOS | Yes | Yes | Yes | Yes | Yes | Yes | No | No | No | |
AIX | Yes | Yes | Yes | No | No | No | No | No | No | |
SPARC | Solaris | Yes | Yes | Yes | Yes | Yes | No | No | No | No |
NetBSD | Yes | Yes | Yes | Yes | Yes | No | No | No | No | |
Embedded | Yes | Yes | Yes | Yes | Yes | No | No | No | No | |
Linux | Yes | Yes | Yes | Yes | Yes | No | No | No | No | |
SPARC64 | Linux | Yes | Yes | Yes | No | No | No | No | No | No |
RISC-V | Embedded | Yes | No | No | No | No | No | No | No | No |
RISC-V64 | Embedded | Yes | No | No | No | No | No | No | No | No |
Java virtual machine | Java | Yes | No | No | No | No | No | No | No | No |
Android | Yes | No | No | No | No | No | No | No | No | |
MIPS (BE and LE) | Linux | Yes | No | No | No | No | No | No | No | No |
Embedded | Yes | No | No | No | No | No | No | No | No | |
8086 (16-bit) | DOS | Yes | No | No | No | No | No | No | No | No |
Win16 | Yes | No | No | No | No | No | No | No | No | |
Embedded | Yes | No | No | No | No | No | No | No | No | |
m68k | Linux | Yes | No | No | No | No | No | No | No | Yes |
NetBSD | Unknown | No | No | No | No | No | No | No | Yes | |
AmigaOS | Yes | No | No | No | No | No | No | No | Yes | |
Atari TOS | No | No | No | No | No | No | No | No | Yeslimited cross-compiler only |
Free Pascal also supports byte code generation for the Java Virtual Machine as of version 3.0.0 and targets both Oracle's Java and Google's Android JVM,[3] although Object Pascal syntax is not fully supported. Free Pascal 3.0.0 also supports ARMHF platforms like the Raspberry Pi, including ARMV6-EABIHF running on Raspbian. MIPS. Work on 64-bit ARM has resulted in support for iOS in 3.0.0 as well. A native ARM Android target has been added, ending the formerly hacked ARM Linux target to generate native ARM libraries for Android. This makes porting Lazarus applications to Android (using Custom Drawn Interface[4]) easier. Since FPC 2.6.2, OpenBSD and NetBSD are supported on IA32 and X86_64 architectures. A new target embedded has been added for usage without OS (ARM Cortex M and MIPS mainly). With InstantFPC it is possible to run Pascal programs, which are translated just in time, as Unix scripts or CGI back-end.
Integrated development environments[edit]
Like most modern compilers, Free Pascal can be used with an integrated development environment (IDE). Besides independent IDEs there are also plugins to various existing IDEs
Free Pascal IDE in Linux
- Free Pascal has its own text-mode IDE resembling Turbo Pascal's IDE. It is made using the Free Vision framework (also included with Free Pascal), a Turbo Vision clone. In addition to many features of the Turbo Pascal IDE, it has code completion and support for multiple help file formats (HTML, Microsoft Compiled HTML Help (CHM), Information Presentation Facility (IPF). Instead of using command line tools, the IDE uses its own embedded compiler, based on the same source as the command line compiler and debugger (using libgdb or GDBMI) to provide its functionality.
- Lazarus is the most popular IDE used by Free Pascal programmers. It looks and feels similar to the Delphi IDE, and can be used to create console and graphical applications, Windows services, daemons, and web applications. Lazarus provides a cross-platform user interface framework, called Lazarus Component Library (LCL). Graphical applications created with LCL can be ported to another platform via recompiling or cross compiling.
- CodeTyphon is a third party distribution of the Lazarus IDE for Windows, Linux, FreeBSD and Solaris. It has already many components pre-installed and aims for a cross compiling out of the box.
- MSEide is another Free Pascal-based IDE for building GUI applications. MSEgui, similarly to LCL for Lazarus, is the class library that comes with MSEide. It communicates directly with X11 via Xlib on Linux, and Windows API (WinAPI, gdi32) in Windows, with support for multiple document interface (MDI) and visual form inheritance.
- Dev-Pascal is a free Windows-only IDE for Free Pascal and GNU Pascal, with no further development following the 2004 FPC version and the 2005 GPC version.
- Open Sibyl was an effort to retarget the Sibyl (Speed/2 Pascal) IDE for OS/2 and eCS to Free Pascal after Speedsoft released the sources of the Sibyl (Speedpascal) IDE. Its functional status and completeness are unknown, and the last snapshot was from 2002. Attempts to retarget to Virtual Pascal preceded it.
- Megido was an effort to create a cross-platform IDE for Free Pascal. It was discontinued, but paved the way for developing Lazarus and Open Sibyl.
- PascalGUI is small IDE that runs directly on Android devices.
- I-Pascal is an Object Pascal IDE plug-in for the IntelliJ IDEA platform.[5] It provides all main features and advanced Pascal code navigation, Free Pascal Compiler integration and other features provided by IDEA.
- OmniPascal is an Object Pascal plugin for Visual Studio Code. It provides code completion, build integration and other features.
Bundled libraries[edit]
Apart from a compiler and an IDE Free Pascal provides the following libraries:
- Free Pascal Runtime Library (RTL): Basic low-level runtime library for general programming tasks
- Free Component Library (FCL): High-level software component library for general programming tasks
Examples of software produced with Free Pascal[edit]
- Beyond Compare is a data comparison utility for Windows, OS X, and Linux. The Linux and OS X versions are compiled with Lazarus/FPC.
- Cartes du Ciel is a free planetarium program for Linux, OS X, and Windows. It maps and labels most constellations, planets, and objects visible by telescope. It was fully written in Lazarus/FPC, and released under GPL.
- Cheat Engine is an open-source memory scanner, hex editor, and debugger. It can be used for cheating in computer games. Since version 6.0 it is compiled with Lazarus/FPC.
- CudaText is a cross-platform text editor, written in Lazarus.
- Coedit is an IDE for the D programming language.
- D_2D & D_3Ddata plotting programs.[6]
- Double Commander is an open-source multi-platform two-panel orthodox file manager inspired by the Microsoft Windows-only Total Commander.
- Free Pascal is written in Object Pascal and assembly language, and self-compiled.
- Hedgewars: a turn based strategy game similar to Worms.
- HNSKY, Hallo Northern Sky is a free planetarium program for Windows and Linux. Since version 3.4.0 written & compiled with Lazarus/FPC.
- Lazarus: Free Pascal’s affiliated Delphi-like software package for rapid development of graphical applications.
- MeKin2D: package for planar linkage, cam and gear mechanism kinematics.[7]
- Mizar Proof Checker[8]
- Morfik: Morfik WebOS AppBuilder uses Free Pascal to produce CGI binaries.
- MyNotex is a free software note-taking and notes manager for GNU/Linux.
- Peazip is an open source archiver, made with Lazarus/FPC.
- Pixel Studio FX is an image editor geared towards using templates to rapidly design e-book covers.[9]
- Symsyn is an old style programming language that runs on a Pascal Virtual Machine.[10]
- TorChat, previously written in Python, is now being rewritten in Free Pascal and Lazarus.
- QED Solver is software to perform numerical calculations for math, science and engineering applications.[11] It has a simple declarative programming language that allows linear and nonlinear equations to be entered as one would write them. The iOS version is built with an Objective-C front end that is statically linked to the equation solving engine and syntax highlighter, written in Object Pascal and compiled using Free Pascal.
- Ultibo is an embedded runtime environment for the Raspberry Pi and the corresponding IDE.[12] The RTE runs on the bare hardware of the Raspberry Pi without any operating system. The IDE is based on Lazarus
See also[edit]
- fpGUI Free Pascal GUI toolkit – a cross-platform and custom-drawn toolkit implemented in Object Pascal
References[edit]
- ^bugs.freepascal.org
- ^User Changes 2.4.2
- ^freepascal wiki: FPC JVM
- ^Custom Drawn Interface
- ^An Object Pascal IDE plug-in
- ^'D_2D and D_3D plotting programs'. sourceforge.net. Retrieved 2018-03-23.
- ^'MeKin2D: Subroutines for planar linkage mechanism kinematic simulation'. sourceforge.net. Retrieved 2018-03-23.
- ^'Association of Mizar Users'. mizar.uwb.edu.pl. Retrieved 2017-11-18.
- ^Pixel Studio FX
- ^Symsyn
- ^QED Solver
- ^Ultibo
External links[edit]
Wikimedia Commons has media related to Free Pascal. |
Wikibooks has a book on the topic of: Pascal Programming |
Official websites[edit]
- Official website FPC
- Official website Lazarus RAD IDE
General introduction[edit]
- Modern Object Pascal Introduction for Programmers - by Michalis Kamburelis
Other FPC development tools[edit]
- FPS – a complete Win32-based IDE for FPC, including debugger (trace, breakpoint and watch windows)
- DevPascal – Win32-based IDE for FPC
- Tabitha – a Windows portable editor for FreePascal
- 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[edit]
- FPC 4 GBA Programming Tutorial – an extensive tutorial into game programming on the Game Boy Advance with Free Pascal
Retrieved from 'https://en.wikipedia.org/w/index.php?title=Free_Pascal&oldid=916688349'