HOME

TheInfoList



OR:

Object Pascal is an extension to the programming language Pascal that provides
object-oriented programming Object-oriented programming (OOP) is a programming paradigm based on the concept of '' objects''. Objects can contain data (called fields, attributes or properties) and have actions they can perform (called procedures or methods and impl ...
(OOP) features such as classes and methods. The language was originally developed by
Apple Computer Apple Inc. is an American multinational corporation and technology company headquartered in Cupertino, California, in Silicon Valley. It is best known for its consumer electronics, software, and services. Founded in 1976 as Apple Computer Co ...
as '' Clascal'' for the
Lisa Lisa or LISA may refer to: People People with the mononym * Lisa (Japanese musician, born 1974), stylized "LISA" * Lisa, stagename of Japanese singer Lisa Komine (born 1978) * Lisa (South Korean singer) (born 1980) * Lisa (Japanese musician, b ...
Workshop development system. As Lisa gave way to
Macintosh Mac is a brand of personal computers designed and marketed by Apple Inc., Apple since 1984. The name is short for Macintosh (its official name until 1999), a reference to the McIntosh (apple), McIntosh apple. The current product lineup inclu ...
, Apple collaborated with
Niklaus Wirth Niklaus Emil Wirth ( IPA: ) (15 February 1934 – 1 January 2024) was a Swiss computer scientist. He designed several programming languages, including Pascal, and pioneered several classic topics in software engineering. In 1984, he won the Tu ...
, the author of Pascal, to develop an officially standardized version of Clascal. This was renamed Object Pascal. Through the mid-1980s, Object Pascal was the main programming language for early versions of the MacApp
application framework In computer programming, an application framework consists of a software framework used by software developers to implement the standard structure of application software. Application frameworks became popular with the rise of graphical user inte ...
. The language lost its place as the main development language on the Mac in 1991 with the release of the C++-based MacApp 3.0. Official support ended in 1996. Symantec also developed a
compiler In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primaril ...
for Object Pascal for their Think Pascal product, which could compile programs much faster than Apple's own
Macintosh Programmer's Workshop Macintosh Programmer's Workshop (MPW) is a software development environment for the Classic Mac OS operating system, written by Apple Computer. For Macintosh developers, it was one of the primary tools for building applications for System 7.x an ...
(MPW). Symantec then developed the Think Class Library (TCL), based on MacApp concepts, which could be called from both Object Pascal and THINK C. The Think suite largely displaced MPW as the main development platform on the Mac in the late 1980s. Symantec ported Object Pascal to the PC, and developed a similar object framework on that platform. In contrast to TCL, which eventually migrated to C++, the PC
libraries A library is a collection of Book, books, and possibly other Document, materials and Media (communication), media, that is accessible for use by its members and members of allied institutions. Libraries provide physical (hard copies) or electron ...
remained mainly based on Pascal.
Borland Borland Software Corporation was a computing technology company founded in 1983 by Niels Jensen, Ole Henriksen, Mogens Glad, and Philippe Kahn. Its main business was developing and selling software development and software deployment products. B ...
added support for object-oriented programming to
Turbo Pascal Turbo Pascal is a software development system that includes a compiler and an integrated development environment (IDE) for the programming language Pascal (programming language), Pascal running on the operating systems CP/M, CP/M-86, and MS-DOS. ...
5.5, which would eventually become the basis for the Object Pascal dialect used in
Delphi Delphi (; ), in legend previously called Pytho (Πυθώ), was an ancient sacred precinct and the seat of Pythia, the major oracle who was consulted about important decisions throughout the ancient Classical antiquity, classical world. The A ...
created by
Anders Hejlsberg Anders Hejlsberg (; ; born 2 December 1960) is a Denmark, Danish software engineer who co-designed several programming languages and development tools. He was the original author of Turbo Pascal and the chief architect of Delphi (programming lang ...
. Delphi remained mainstream for business applications on the PC into the early 2000s, and was partly displaced in the 2000s with the introduction of the .NET Framework which included Hejlsberg's C#.


History


Apple Pascal

Pascal became a major language in the programming world in the 1970s, with high-quality implementations on most
minicomputer A minicomputer, or colloquially mini, is a type of general-purpose computer mostly developed from the mid-1960s, built significantly smaller and sold at a much lower price than mainframe computers . By 21st century-standards however, a mini is ...
platforms and
microcomputer A microcomputer is a small, relatively inexpensive computer having a central processing unit (CPU) made out of a microprocessor. The computer also includes memory and input/output (I/O) circuitry together mounted on a printed circuit board (P ...
s. Among the latter was the
UCSD Pascal UCSD Pascal is a Pascal programming language system that runs on the UCSD p-System, a portable, highly machine-independent operating system. UCSD Pascal was first released in 1977. It was developed at the University of California, San Diego (UC ...
system, which compiled to an intermediate ''p-System'' code format that could then run on multiple platforms. Apple licensed UCSD and used it as the basis for their Apple Pascal system for the
Apple II Apple II ("apple Roman numerals, two", stylized as Apple ][) is a series of microcomputers manufactured by Apple Computer, Inc. from 1977 to 1993. The Apple II (original), original Apple II model, which gave the series its name, was designed ...
and Apple III. Pascal became one of the major languages in the company in this period. With the start of the Apple Lisa project, Pascal was selected as the main programming language of the platform, although this time as a ''compiler'' in contrast to the p-System ''interpreter''.


Clascal and Apple's early Object Pascal

Object Pascal is an extension of the Pascal language that was developed at
Apple Computer Apple Inc. is an American multinational corporation and technology company headquartered in Cupertino, California, in Silicon Valley. It is best known for its consumer electronics, software, and services. Founded in 1976 as Apple Computer Co ...
by a team led by
Larry Tesler Lawrence Gordon Tesler (April 24, 1945 – February 16, 2020) was an American computer scientist who worked in the field of human–computer interaction. Tesler worked at Xerox PARC, Apple Inc., Apple, Amazon.com, Amazon, and Yahoo!. While at PA ...
in consultation with
Niklaus Wirth Niklaus Emil Wirth ( IPA: ) (15 February 1934 – 1 January 2024) was a Swiss computer scientist. He designed several programming languages, including Pascal, and pioneered several classic topics in software engineering. In 1984, he won the Tu ...
, the inventor of Pascal. It is descended from an earlier object-oriented version of Pascal named Clascal, which was available on the
Lisa Lisa or LISA may refer to: People People with the mononym * Lisa (Japanese musician, born 1974), stylized "LISA" * Lisa, stagename of Japanese singer Lisa Komine (born 1978) * Lisa (South Korean singer) (born 1980) * Lisa (Japanese musician, b ...
computer. Object Pascal was needed to support MacApp, an expandable Macintosh application framework that would now be termed a class library. Object Pascal extensions, and MacApp, were developed by Barry Haynes, Ken Doyle, and Larry Rosenstein, and were tested by Dan Allen. Larry Tesler oversaw the project, which began very early in 1985 and became a product in 1986. An Object Pascal extension was also implemented in the Think Pascal
integrated development environment An integrated development environment (IDE) is a Application software, software application that provides comprehensive facilities for software development. An IDE normally consists of at least a source-code editor, build automation tools, an ...
(IDE). The IDE includes the compiler and an editor with
syntax highlighting Syntax highlighting is a feature of text editors that is used for programming language, programming, scripting language, scripting, or markup language, markup languages, such as HTML. The feature displays text, especially source code, in differe ...
and checking, a powerful
debugger A debugger is a computer program used to test and debug other programs (the "target" programs). Common features of debuggers include the ability to run or halt the target program using breakpoints, step through code line by line, and display ...
, and a class library. Many developers preferred Think Pascal over Apple's implementation of Object Pascal because Think Pascal offered a much faster compile– link–debug cycle, and tight integration of its tools. The last official release of Think Pascal was 4.01, in 1992. Symantec later released an unofficial version 4.5d4 at no charge. Apple dropped support for Object Pascal when they moved from
Motorola 68000 series The Motorola 68000 series (also known as 680x0, m68000, m68k, or 68k) is a family of 32-bit computing, 32-bit complex instruction set computer (CISC) microprocessors. During the 1980s and early 1990s, they were popular in personal computers and ...
chips to IBM's
PowerPC PowerPC (with the backronym Performance Optimization With Enhanced RISC – Performance Computing, sometimes abbreviated as PPC) is a reduced instruction set computer (RISC) instruction set architecture (ISA) created by the 1991 Apple Inc., App ...
architecture in 1994. MacApp 3.0, had already been rewritten in C++ and ported to this platform. Metrowerks offered with
CodeWarrior CodeWarrior is an integrated development environment (IDE) published by NXP Semiconductors for editing, compiling, and debugging software for several microcontrollers and microprocessors (NXP ColdFire, Freescale ColdFire, ColdFire+, Kinetis, Qori ...
an Object Pascal compiler for Macintosh that targeted both 68k and
PowerPC PowerPC (with the backronym Performance Optimization With Enhanced RISC – Performance Computing, sometimes abbreviated as PPC) is a reduced instruction set computer (RISC) instruction set architecture (ISA) created by the 1991 Apple Inc., App ...
, both in their IDE and as MPW tools. Macintosh developers using Object Pascal had a path to port to the
PowerPC PowerPC (with the backronym Performance Optimization With Enhanced RISC – Performance Computing, sometimes abbreviated as PPC) is a reduced instruction set computer (RISC) instruction set architecture (ISA) created by the 1991 Apple Inc., App ...
, even architecture after both Apple and Symantec dropped support. MacApp 2.0, written in Object Pascal, was ported to the PowerPC using
CodeWarrior CodeWarrior is an integrated development environment (IDE) published by NXP Semiconductors for editing, compiling, and debugging software for several microcontrollers and microprocessors (NXP ColdFire, Freescale ColdFire, ColdFire+, Kinetis, Qori ...
.


Borland, Inprise, CodeGear, and Embarcadero years

In 1986,
Borland Borland Software Corporation was a computing technology company founded in 1983 by Niels Jensen, Ole Henriksen, Mogens Glad, and Philippe Kahn. Its main business was developing and selling software development and software deployment products. B ...
introduced similar extensions, also named Object Pascal, to the
Turbo Pascal Turbo Pascal is a software development system that includes a compiler and an integrated development environment (IDE) for the programming language Pascal (programming language), Pascal running on the operating systems CP/M, CP/M-86, and MS-DOS. ...
product for the Macintosh, and in 1989 for Turbo Pascal 5.5 for DOS. When Borland refocused from DOS to
Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
in 1994, they created a successor to Turbo Pascal, named
Delphi Delphi (; ), in legend previously called Pytho (Πυθώ), was an ancient sacred precinct and the seat of Pythia, the major oracle who was consulted about important decisions throughout the ancient Classical antiquity, classical world. The A ...
, and introduced a new set of extensions to create what is now known as the Delphi language. The development of Delphi started in 1993 and Delphi 1.0 was officially released in the United States on 14 February 1995. While code using the Turbo Pascal object model could still be compiled, Delphi featured a new syntax using the keyword class in preference to object, the Create constructor and a virtual Destroy destructor (and negating having to call the New and Dispose procedures), properties, method pointers, and some other things. These were inspired by the
ISO The International Organization for Standardization (ISO ; ; ) is an independent, non-governmental, international standard development organization composed of representatives from the national standards organizations of member countries. Me ...
working
draft Draft, the draft, or draught may refer to: Watercraft dimensions * Draft (hull), the distance from waterline to keel of a vessel * Draft (sail), degree of curvature in a sail * Air draft, distance from waterline to the highest point on a v ...
for object-oriented extensions, but many of the differences from Turbo Pascal's dialect (such as the draft's requirement that all methods be virtual) were ignored. The Delphi language has continued to evolve over the years to support constructs such as
dynamic array In computer science, a dynamic array, growable array, resizable array, dynamic table, mutable array, or array list is a random access, variable-size list data structure that allows elements to be added or removed. It is supplied with standard l ...
s, generics and anonymous methods. The old object syntax introduced by Apple ("Old-Style Object Types") is still supported.


Versions

*
Borland Borland Software Corporation was a computing technology company founded in 1983 by Niels Jensen, Ole Henriksen, Mogens Glad, and Philippe Kahn. Its main business was developing and selling software development and software deployment products. B ...
used the name ''Object Pascal'' for the programming language in the first versions, but later renamed it to ''Delphi''.
Compiler In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primaril ...
s that claim to be compatible with Object Pascal are often trying to be compatible with Delphi
source code In computing, source code, or simply code or source, is a plain text computer program written in a programming language. A programmer writes the human readable source code to control the behavior of a computer. Since a computer, at base, only ...
. Because Delphi is a
trademark A trademark (also written trade mark or trade-mark) is a form of intellectual property that consists of a word, phrase, symbol, design, or a combination that identifies a Good (economics and accounting), product or Service (economics), service f ...
, compatible compilers continue using the name ''Object Pascal''. * Embarcadero Technologies, which purchased Delphi in 2008, sells the
Delphi Delphi (; ), in legend previously called Pytho (Πυθώ), was an ancient sacred precinct and the seat of Pythia, the major oracle who was consulted about important decisions throughout the ancient Classical antiquity, classical world. The A ...
integrated development environment An integrated development environment (IDE) is a Application software, software application that provides comprehensive facilities for software development. An IDE normally consists of at least a source-code editor, build automation tools, an ...
(IDE) that compiles the Delphi dialect of Object Pascal to
Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
and
macOS macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
,
iOS Ios, Io or Nio (, ; ; locally Nios, Νιός) is a Greek island in the Cyclades group in the Aegean Sea. Ios is a hilly island with cliffs down to the sea on most sides. It is situated halfway between Naxos and Santorini. It is about long an ...
, Android and Web. *
.NET The .NET platform (pronounced as "''dot net"'') is a free and open-source, managed code, managed computer software framework for Microsoft Windows, Windows, Linux, and macOS operating systems. The project is mainly developed by Microsoft emplo ...
support existed from Delphi 8 through Delphi 2005, 2006, and 2007, which now has been replaced by another language, ''Oxygene'' (see below), which is not fully backward-compatible. * The Oxygene language developed by RemObjects Software targets the
Common Language Infrastructure The Common Language Infrastructure (CLI) is an open specification and technical standard originally developed by Microsoft and standardized by International Organization for Standardization, ISO/International Electrotechnical Commission, IEC (ISO/ ...
, the
Java Java is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea (a part of Pacific Ocean) to the north. With a population of 156.9 million people (including Madura) in mid 2024, proje ...
Runtime Environment and
Apple An apple is a round, edible fruit produced by an apple tree (''Malus'' spp.). Fruit trees of the orchard or domestic apple (''Malus domestica''), the most widely grown in the genus, are agriculture, cultivated worldwide. The tree originated ...
's Cocoa frameworks for
iOS Ios, Io or Nio (, ; ; locally Nios, Νιός) is a Greek island in the Cyclades group in the Aegean Sea. Ios is a hilly island with cliffs down to the sea on most sides. It is situated halfway between Naxos and Santorini. It is about long an ...
and
macOS macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
. * The
open source Open source is source code that is made freely available for possible modification and redistribution. Products include permission to use and view the source code, design documents, or content of the product. The open source model is a decentrali ...
Free Pascal 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, witexception clausesthat allow static linking against it ...
project allows the language to be compiled for a wide range of
operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
s, including
Linux Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
(
32-bit In computer architecture, 32-bit computing refers to computer systems with a processor, memory, and other major system components that operate on data in a maximum of 32- bit units. Compared to smaller bit widths, 32-bit computers can perform la ...
,
64-bit In computer architecture, 64-bit integers, memory addresses, or other data units are those that are 64 bits wide. Also, 64-bit central processing units (CPU) and arithmetic logic units (ALU) are those that are based on processor registers, a ...
),
FreeBSD FreeBSD is a free-software Unix-like operating system descended from the Berkeley Software Distribution (BSD). The first version was released in 1993 developed from 386BSD, one of the first fully functional and free Unix clones on affordable ...
,
Classic Mac OS Mac OS (originally System Software; retronym: Classic Mac OS) is the series of operating systems developed for the Mac (computer), Macintosh family of personal computers by Apple Computer, Inc. from 1984 to 2001, starting with System 1 and end ...
,
macOS macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
, Solaris,
Windows API The Windows API, informally WinAPI, is the foundational application programming interface (API) that allows a computer program to access the features of the Microsoft Windows operating system in which the program is running. Programs can acces ...
(32, 64, CE), the ARM
instruction set architecture In computer science, an instruction set architecture (ISA) is an abstract model that generally defines how software controls the CPU in a computer or a family of computers. A device or program that executes instructions described by that ISA, ...
(ISA), and several other hardware architectures. The first version of Free Pascal for the
iPhone The iPhone is a line of smartphones developed and marketed by Apple that run iOS, the company's own mobile operating system. The first-generation iPhone was announced by then–Apple CEO and co-founder Steve Jobs on January 9, 2007, at ...
software development kit A software development kit (SDK) is a collection of software development tools in one installable package. They facilitate the creation of applications by having a compiler, debugger and sometimes a software framework. They are normally specific t ...
(SDK) 2.''x'' was announced on January 17, 2009. * The Smart Pascal language targets
ECMAScript ECMAScript (; ES) is a standard for scripting languages, including JavaScript, JScript, and ActionScript. It is best known as a JavaScript standard intended to ensure the interoperability of web pages across different web browsers. It is stan ...
JavaScript JavaScript (), often abbreviated as JS, is a programming language and core technology of the World Wide Web, alongside HTML and CSS. Ninety-nine percent of websites use JavaScript on the client side for webpage behavior. Web browsers have ...
and is used in Smart Mobile Studio, written by Jon Lennart Aasenden and published by Optimale Systemer (2012). The language greatly simplifies
HTML5 HTML5 (Hypertext Markup Language 5) is a markup language used for structuring and presenting hypertext documents on the World Wide Web. It was the fifth and final major HTML version that is now a retired World Wide Web Consortium (W3C) recommend ...
development through object-oriented, and
rapid application development Rapid application development (RAD), also called rapid application building (RAB), is both a general term for adaptive software development approaches, and the name for James Martin's method of rapid development. In general, RAD approaches to ...
(RAD) methods. Smart Pascal integrates tightly with established technologies such as node.js, Embarcadero DataSnap, and Remobjects SDK to produce high-performance
client–server model The client–server model is a distributed application structure that partitions tasks or workloads between the providers of a resource or service, called servers, and service requesters, called clients. Often clients and servers communicate ov ...
web applications. The language allows easy creation of visual components and reusable libraries. The Smart Pascal dialect stems from the DWScript language, extended to better integrate with the JavaScript environment and libraries, such as asm sections which are plain JavaScript but have access to Pascal symbols, or ''external'' classes which map directly to prototypal JavaScript classes. Smart Pascal introduces true inheritance, classes, partial classes, interfaces, a
virtual method table In computer programming, a virtual method table (VMT), virtual function table, virtual call table, dispatch table, vtable, or vftable is a mechanism used in a programming language to support dynamic dispatch (or run-time method binding). ...
and many other advanced constructs which are not a part of JavaScript by default. * The Morfik Pascal language, developed by Morfik, targets
Ajax Ajax may refer to: Greek mythology and tragedy * Ajax the Great, a Greek mythological hero, son of King Telamon and Periboea * Ajax the Lesser, a Greek mythological hero, son of Oileus, the king of Locris * Ajax (play), ''Ajax'' (play), by the an ...
-enabled Web applications. The compiler is built into the company's AppsBuilder IDE and allows Object Pascal code to be used in implementing code to execute in a browser or server. It uses the
Free Pascal 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, witexception clausesthat allow static linking against it ...
compiler to generate native binaries from Object Pascal. * The open source
GNU Pascal GNU Pascal (GPC) is a Pascal programming language, Pascal compiler composed of a frontend to GNU Compiler Collection (GCC), similar to the way Fortran and other languages were added to GCC. GNU Pascal is International Organization for Standardizat ...
compiler is available as a front-end to the
GNU Compiler Collection The GNU Compiler Collection (GCC) is a collection of compilers from the GNU Project that support various programming languages, Computer architecture, hardware architectures, and operating systems. The Free Software Foundation (FSF) distributes ...
, which implements the
International Organization for Standardization The International Organization for Standardization (ISO ; ; ) is an independent, non-governmental, international standard development organization composed of representatives from the national standards organizations of member countries. M ...
(ISO) 7185 Pascal standard, and most of the ISO 10206 Extended Pascal standard. * Turbo51 is a free compiler to program Intel 8051 chips. * WDSibyl is an open source Delphi-like IDE and compiler available for
Microsoft Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
and
OS/2 OS/2 is a Proprietary software, proprietary computer operating system for x86 and PowerPC based personal computers. It was created and initially developed jointly by IBM and Microsoft, under the leadership of IBM software designer Ed Iacobucci, ...
, and is a commercial
Turbo Pascal Turbo Pascal is a software development system that includes a compiler and an integrated development environment (IDE) for the programming language Pascal (programming language), Pascal running on the operating systems CP/M, CP/M-86, and MS-DOS. ...
compatible environment released by a company named Speedsoft that was later developed into a Delphi-like RAD environment named Sybil, and then open sourced under the GPL when that company closed down. Wolfgang Draxler (WD) now maintains the software. The compiler used seems to be located in a DLL and is not open-source.


Compilers

Object Pascal
compiler In computing, a compiler is a computer program that Translator (computing), translates computer code written in one programming language (the ''source'' language) into another language (the ''target'' language). The name "compiler" is primaril ...
s are available for a wide range of
operating system An operating system (OS) is system software that manages computer hardware and software resources, and provides common daemon (computing), services for computer programs. Time-sharing operating systems scheduler (computing), schedule tasks for ...
s and architectures. *
Delphi Delphi (; ), in legend previously called Pytho (Πυθώ), was an ancient sacred precinct and the seat of Pythia, the major oracle who was consulted about important decisions throughout the ancient Classical antiquity, classical world. The A ...
is probably the best known compiler. It is the successor of the highly successful Borland Pascal and
Turbo Pascal Turbo Pascal is a software development system that includes a compiler and an integrated development environment (IDE) for the programming language Pascal (programming language), Pascal running on the operating systems CP/M, CP/M-86, and MS-DOS. ...
product line. It targets
Windows 9x Windows 9x is a generic term referring to a line of discontinued Microsoft Windows operating systems released from 1995 to 2000 and supported until 2006, which were based on the kernel introduced in Windows 95 and modified in succeeding version ...
(Delphi 2007 and older), the
Windows NT Windows NT is a Proprietary software, proprietary Graphical user interface, graphical operating system produced by Microsoft as part of its Windows product line, the first version of which, Windows NT 3.1, was released on July 27, 1993. Original ...
family, .NET Framework (Delphi 8, 2005, 2007),
macOS macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
(Delphi XE2 and later),
iOS Ios, Io or Nio (, ; ; locally Nios, Νιός) is a Greek island in the Cyclades group in the Aegean Sea. Ios is a hilly island with cliffs down to the sea on most sides. It is situated halfway between Naxos and Santorini. It is about long an ...
(Delphi XE2 and later, generating native binaries in XE4 and later), Android (Delphi XE5 and later, generating native binaries in XE5 and later). Support for .NET finally became a separate product known as Oxygene (see below). *
Free Pascal 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, witexception clausesthat allow static linking against it ...
Compiler (FPC) is an open-source Object Pascal compiler that supports many Pascal dialects, including
Turbo Pascal Turbo Pascal is a software development system that includes a compiler and an integrated development environment (IDE) for the programming language Pascal (programming language), Pascal running on the operating systems CP/M, CP/M-86, and MS-DOS. ...
7, Delphi, and others. Currently, FPC can generate code for
IA-32 IA-32 (short for "Intel Architecture, 32-bit", commonly called ''i386'') is the 32-bit version of the x86 instruction set architecture, designed by Intel and first implemented in the i386, 80386 microprocessor in 1985. IA-32 is the first incarn ...
,
x86-64 x86-64 (also known as x64, x86_64, AMD64, and Intel 64) is a 64-bit extension of the x86 instruction set architecture, instruction set. It was announced in 1999 and first available in the AMD Opteron family in 2003. It introduces two new ope ...
,
PowerPC PowerPC (with the backronym Performance Optimization With Enhanced RISC – Performance Computing, sometimes abbreviated as PPC) is a reduced instruction set computer (RISC) instruction set architecture (ISA) created by the 1991 Apple Inc., App ...
, SPARC, and ARM processors, and for several operating systems, including
Microsoft Windows Windows is a Product lining, product line of Proprietary software, proprietary graphical user interface, graphical operating systems developed and marketed by Microsoft. It is grouped into families and subfamilies that cater to particular sec ...
,
Linux Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
,
FreeBSD FreeBSD is a free-software Unix-like operating system descended from the Berkeley Software Distribution (BSD). The first version was released in 1993 developed from 386BSD, one of the first fully functional and free Unix clones on affordable ...
,
Classic Mac OS Mac OS (originally System Software; retronym: Classic Mac OS) is the series of operating systems developed for the Mac (computer), Macintosh family of personal computers by Apple Computer, Inc. from 1984 to 2001, starting with System 1 and end ...
, and
macOS macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
(with an
Xcode Xcode is a suite of developer tools for building apps on Apple devices. It includes an integrated development environment (IDE) of the same name for macOS, used to develop software for macOS, iOS, iPadOS, watchOS, tvOS, and visionOS. It w ...
integration kit). Several separate projects exist to facilitate rapid application development with FPC, the most prominent one being
Lazarus (IDE) Lazarus is a Cross-platform software, cross-platform, integrated development environment (IDE) for rapid application development (RAD) using the Free Pascal compiler. Its goal is to provide an easy-to-use development environment for developing w ...
. *
GNU Pascal GNU Pascal (GPC) is a Pascal programming language, Pascal compiler composed of a frontend to GNU Compiler Collection (GCC), similar to the way Fortran and other languages were added to GCC. GNU Pascal is International Organization for Standardizat ...
(a separately distributed part of the
GNU Compiler Collection The GNU Compiler Collection (GCC) is a collection of compilers from the GNU Project that support various programming languages, Computer architecture, hardware architectures, and operating systems. The Free Software Foundation (FSF) distributes ...
), while not formally aimed at the Delphi dialect of Pascal, does contain a Turbo Pascal compatibility mode, and is very slowly incorporating a few Delphi language features. It is unsuitable for recompiling large bodies of Delphi code directly, but is notable as having prolific support for operating systems and hardware architectures. * Oxygene (formerly ''Chrome'') is an Object Pascal compiler from RemObjects Software that integrates into
Microsoft Visual Studio Visual Studio is an integrated development environment (IDE) developed by Microsoft. It is used to develop computer programs including websites, web apps, web services and mobile apps. Visual Studio uses Microsoft software development platforms ...
. It is also available as free
command-line interface A command-line interface (CLI) is a means of interacting with software via command (computing), commands each formatted as a line of text. Command-line interfaces emerged in the mid-1960s, on computer terminals, as an interactive and more user ...
compiler that runs native on
CLI CLI may refer to: Computing * Call Level Interface, an SQL database management API * Command-line interface, of a computer program * Command-line interpreter or command language interpreter; see List of command-line interpreters * CLI (x86 instruc ...
. It is three compilers in one, each targeting a different platform: Echoes for .NET Framework, Mono, WinRT and
Windows Phone 8 Windows Phone 8 is the second generation of the Windows Phone mobile operating system from Microsoft Corporation, Microsoft, released on October 29, 2012. It runs on the Windows NT kernel and is the successor to Windows Phone 7. It was the first ...
, Cooper for JDK and Android, and Nougat for
iOS Ios, Io or Nio (, ; ; locally Nios, Νιός) is a Greek island in the Cyclades group in the Aegean Sea. Ios is a hilly island with cliffs down to the sea on most sides. It is situated halfway between Naxos and Santorini. It is about long an ...
and
macOS macOS, previously OS X and originally Mac OS X, is a Unix, Unix-based operating system developed and marketed by Apple Inc., Apple since 2001. It is the current operating system for Apple's Mac (computer), Mac computers. With ...
.


Legacy products

* Borland Kylix was a
Linux Linux ( ) is a family of open source Unix-like operating systems based on the Linux kernel, an kernel (operating system), operating system kernel first released on September 17, 1991, by Linus Torvalds. Linux is typically package manager, pac ...
variant of Delphi which only targets Intel 32-bit Linux using the Qt library. It does not work out of the box with most modern Linux distributions. * Virtual Pascal was a free 32-bit Turbo Pascal and Delphi compatible compiler for mainly
OS/2 OS/2 is a Proprietary software, proprietary computer operating system for x86 and PowerPC based personal computers. It was created and initially developed jointly by IBM and Microsoft, under the leadership of IBM software designer Ed Iacobucci, ...
and Microsoft Windows. Later, it also received a DOS+ Extender and an experimental Linux cross-compiler. The compiler's development stopped at about the level of Delphi 2. In 2007, its official website ceased to operate, and further development ceased.


Interpreters


Pascal Script
(formerly ''InnerFuse'') an
DWScript
(Delphi Web Script) are open-source Object Pascal interpreters and scripting engines written in Delphi. They support subsets of Object Pascal. DWScript can also compile Object Pascal code into JavaScript code (Smart Pascal), and supports
just-in-time compilation In computing, just-in-time (JIT) compilation (also dynamic translation or run-time compilations) is compilation (of computer code) during execution of a program (at run time) rather than before execution. This may consist of source code transl ...
(JIT). Modern Pascal provides 3 different interpreters: a
command-line interface A command-line interface (CLI) is a means of interacting with software via command (computing), commands each formatted as a line of text. Command-line interfaces emerged in the mid-1960s, on computer terminals, as an interactive and more user ...
(CLI), Apache Module (Celerity), and CodeRunner (node.js like solution able to handle different scripts per port), besides the ability to compile and protect a script's
source code In computing, source code, or simply code or source, is a plain text computer program written in a programming language. A programmer writes the human readable source code to control the behavior of a computer. Since a computer, at base, only ...
.


Sample "Hello World" programs

Here are several "Hello World" programs in different Object Pascal versions.


Apple version

program ObjectPascalExample; type THelloWorld = object procedure Put; end; var HelloWorld: THelloWorld; procedure THelloWorld.Put; begin ShowMessage('Hello, World!'); end; begin New(HelloWorld); HelloWorld.Put; Dispose(HelloWorld); end.


Turbo Pascal version

Still supported in Delphi and Free Pascal. FPC also packages its own substitutes for the libraries/units. Delphi does not. The Free Pascal 1.0 series and the FPC textmode IDE are the largest open codebases in this dialect. Free Pascal 2.0 was rewritten in a more Delphi-like dialect, and the textmode IDE and related frameworks (Free Vision) are the only parts in the TP version of Object Pascal.


Stack based allocation

program ObjectPascalExample; type THelloWorld = object procedure Put; end; procedure THelloWorld.Put; begin WriteLn('Hello, World!'); end; var HelloWorld: THelloWorld; begin HelloWorld.Put; end.


Heap based allocation

program ObjectPascalExample; type PHelloWorld = ^THelloWorld; THelloWorld = object procedure Put; end; procedure THelloWorld.Put; begin WriteLn('Hello, World!'); end; var HelloWorld: PHelloWorld; begin New(HelloWorld); HelloWorld^.Put; Dispose(HelloWorld); end. Another example: program ObjectPascalExample; type PHelloWorld = ^THelloWorld; THelloWorld = object procedure Put; end; procedure THelloWorld.Put; begin WriteLn('Hello, World!'); end; var HelloWorld: PHelloWorld; HelloWorld2: ^THelloWorld; HelloWorld3: ^THelloWorld; HelloWorld4: PHelloWorld; begin New(HelloWorld); HelloWorld4 := HelloWorld; HelloWorld2 := HelloWorld; New(HelloWorld3); HelloWorld4 := HelloWorld3; HelloWorld2 := HelloWorld3; Dispose(HelloWorld); Dispose(HelloWorld3); end. This works based on pointer copy, unless there is a specific allocation for a deeper copy.


Delphi and Free Pascal version

program ObjectPascalExample; type THelloWorld = class procedure Put; end; procedure THelloWorld.Put; begin Writeln('Hello, World!'); end; var HelloWorld: THelloWorld; begin HelloWorld := THelloWorld.Create; HelloWorld.Put; HelloWorld.Free; end. Note that the object construct is still available in Delphi and Free Pascal.


Oxygene version

namespace ObjectPascalExample; interface type ConsoleApp = class class method Main; end; THelloWorld = class method Put; end; implementation method THelloWorld.Put; begin Console.WriteLine('Hello, World!'); end; class method ConsoleApp.Main; begin var HelloWorld := new THelloWorld; HelloWorld.Put; end; end.


DWScript (Smart Pascal) version

type THelloWorld = class procedure Put; begin PrintLn('Hello, World!'); end end; var HelloWorld := THelloWorld.Create; HelloWorld.Put; The method implementation can also be made in a distinct location as in other Object Pascal dialects.


Development

Many features have been introduced continuously to Object Pascal with extensions to Delphi and extensions to FreePascal. In reaction to criticism, Free Pascal has adopted generics with the same syntax as Delphi, provided Delphi compatibility mode is selected, and both Delphi (partial) and Free Pascal (more extensive) support
operator overloading In computer programming, operator overloading, sometimes termed ''operator ad hoc polymorphism'', is a specific case of polymorphism, where different operators have different implementations depending on their arguments. Operator overloading ...
. Delphi has also introduced many other features since version 7, including generics. Whereas FreePascal tries to be compatible to Delphi in Delphi compatibility mode, it also usually introduced many new features to the language that are not always available in Delphi.


References


External links


Introduction to Object Pascal
MacTech Vol 2 Issue 12 1985.

"The aim is to list which Pascal constructs are supported, and to show where the Free Pascal implementation differs from the Turbo Pascal or Delphi implementations."
Free Pascal: Reference guide
Reference guide for Free Pascal, version 2.0.0

* ttp://www.think-pascal.org/ Think Pascal 4.5Unofficial page about Symantec's final version of Think Pascal.


Delphi


Object Pascal Language Guide
Covering Borland Delphi 6-7
Delphi Basics
Resource of Delphi project source codes.
Delphi-Help - первая помощь программисту на DelphiDelphi Programming
Resource of Delphi Programming & Delphi Programming Forums. {{Authority control Borland CodeGear software Delphi (programming language) Object-oriented programming languages Systems programming languages Pascal programming language family Programming languages created in 1986