Delphi (programming language)

From Bauman National Library
This page was last modified on 8 June 2016, at 18:18.
Developer Embarcadero Technologies (2009–present)
License Trialware

Delphi is an imperative, structured, object-oriented programming language with strict statically typed variables. The main area of use - writing application software.

The history of the language

Pascal language served as a basis for the Delphi, developed by Professor N.Virt late 60s specifically for teaching students programming. Pascal was fully procedural language, an object-oriented paradigm has been added to Turbo Pascal. Object Pascal (Delphi is its dialect) is a functional extension of the language Turbo Pascal.


Operations by priority

First: -, not

Second: *, /, div, mod, operation such as multiplication

Third: +, -, or, xor

Forth: =, <>, <,>, <=,> =

Data types


Types Ranges








-2147483648 .. +2147483647

0 .. 4294967295

-128 .. +127

-32768 .. +32767

-263 .. +263-1

0 .. +255

0 .. +65535

Fractional numbers

Types Ranges








5*10-324 .. 1.7*10308

2.9*10-39 .. 1.7*1038

1.5*10-45 .. 3.4*1038

5*10-324 .. 1.7*10308

3.6*10-4951 .. 1.1*104932-1

-263 .. +263-1


Strings Strings is a sequence of characters enclosed in single quotes: 'a text string'.

Boolean Boolean type provides a listing of logical True and False values.

The structure of the program

Program, written in Delphi language, consists of a program header, field of used modules Uses (for example, Uses Windows , Messages, SysUtils, and so on. d.), which may not be included in the structure itself, descriptions block and execution block (starting with compound statement begin and ending with end).

A program example

 program Project1;                     // program header
  Unit1 in 'Unit1.pas' {Form1};       // using modules

{$R *.res}

  Application.Initialize;                // Application initialization
  Application.CreateForm(TForm1, Form1); // Form creation
  Application.Run;                       // Running and execution


Delphi Embarcadero(previouslycalled. CodeGear Delphi and Borland Delphi) - the most famous compiler, which is a follower of Borland Pascal and Pascal. Used at Win16 (Delphi 1), Win32 (Delphi 2 and later), Win64 (Delphi 16 (XE2) and later), as well as .NET 1.x, 2.0 (Delphi 8, Delphi 2005-Delphi 2007). .NET is supported later in a separate product known as Oxygene.

Free Pascal (FPC) is a free compiler a ObjectPascal,which supports various dialects of Pascal, including Pascal, Delphi Turbo and other dialects. At the moment, FPC can generate the code for x86-64, PowerPC, SPARC x86, processors, and ARM, as well as for various operating systems, including Microsoft Windows, Linux, FreeBSD, MacOS. There are several software development environments for FPC (one of the most famous representatives Lazarus).

Oxygene (known as Chrome) - Object Pascal compiler , integrated into Visual Studio. Also available as a compiler from the command line CLI. Uses .NET and Mono platforms. Currently sold under the brand Delphi Prism.

MIDletPascal - the compiler that converts the source code into a compact and fast Java byte code.

Virtual Pascal - free compiler for Win32, OS / 2 and Linux. At that time, a very fast and highly compliant (partially supported design Delphi 5). Development ended in 2004, the sources were not opened. Since FPC gone far ahead it is more recommended for programming.

Development tools

Delphi 1. Released shortly before the appearance of Windows 95, Delphi 1.0 was the first development tool for Windows (3.1), combined an optimizing compiler, visual development environment and powerful tools for working with databases. For Pascal language it was a real reincarnation - it became the Object Pascal.

Delphi 2. Released a year later the 2nd edition of Delphi offers all the same, but the 32-bit versions of Windows (95 / NT), once again becoming the first vehicle, combining 32-bit compiler, tools for working with databases and visual development environment that supports OLE (and after the updated Delphi 2.01 - and ActiveX). The language also changed, becoming focused on a 32-bit applications.

Delphi 3. Further improvement of Delphi in all directions led to the third version, which had expanded set of tools for creating applications with support for COM and ActiveX. In this version the first time the emphasis was placed on the ability to create applications for the Internet, as well as untyped data type appeared.

Delphi 4. Another key milestone development. In this version many new and useful things were introduced to simplify the development of applications, including the new environment with dynamic prompts, etc. Model of the components (VCL) was upgraded, you can quickly use technologies such as MIDAS, DCOM and CORBA. At this version Object Pascal language was also improved: there are new features of modern OOP, new types of data are introduced, including 64-bit.

Delphi 5. There had been so many changes in Delphi 4 that, unfortunately, has not been without annoying linings and error. The result was the release of 3-packs (our pirates sell them under the names of Delphi 4.1, 4.2 and 4.3). But the most complete and correct service pack should be considered Delphi 5 - in this version everything was brought to mind that had begun in Delphi 4.

Delphi 6. With the release of the sixth version of Borland was proclaimed a new era of cross-platform in Delphi, parallel to the released version Delphi for OS Linux (Kylix 1.0). Now when you create an application you can choose its type - for Windows, or universal. Accordingly, to the VCL library CLX was added, compatible with both Windows and Linux. In addition, the 6th version finally appeared "native" and not third-party ActiveX, components for working with the Internet, and once in both cases - and for VCL and CLX. Starting with this version, the programming language Object Pascal is officially called Delphi.

Delphi 7. Further development of Delphi 6, CLX library was improved and offsetting new version of the development environment running under Linux - Kylix 3. However, since Delphi 7, Borland attended compatibility question with another platform - Microsoft .NET, for which some changes were made ​​in the VCL, and the language (and, consequently, in the compiler.

Delphi 8. The first version of Delphi oriented to work with the platform Microsoft.NET. In this version, developers changed the interface of the environment, making it look like the Microsoft products - the new major shareholder of Borland. Support of Kylix was discontinued.

Delphi 2005. Less than a year after the release of Delphi 8, a new version, which quickly returned to work in the classical IDE style developing applications for Windows. At the same time, Delphi 2005, in the case of developing applications specifically for the platform NET, allows you to work not only with the language of Delphi, but with C#. In the Delphi language itself such innovations were introduced like operator for ... in and built-in procedures and functions.

Delphi 2006. The latest version of Delphi, released by Borland. Also its lite version Turbo Delphi was released.

Delphi 2007. The version released by CodeGear. Added support for the Aero interface for Windows Vista.

Delphi 2009. The version released by Embarcodero. Implemented Unicode support in the VCL and RTL, replaced all references to the Windows API function to counterparts in Unicode, added generics and anonymous methods.

Delphi 2010. Windows 7, the components to work with touch and gestures dbExpress components and Firebird now officially supported in Delphi.

Delphi XE (Delphi 2011). Support for cloud computing was added.

Language Features

Initially, the language prioritizes slimness and high readability, because it was designed to teach the discipline of programming. This original harmony in the future as the growth of hardware capacity and the emergence of new paradigms simplified language extension. For example, the complexity of the object C ++, compared with C, has grown quite significantly and made ​​it difficult to study it as a first programing language, which is not an Object Pascal relatively to Pascal.

In Delphi, the formal beginning of any program is clearly different from other parts of the code should be placed in a specific, single in project, the source file with the extension dpr (while the other source files of the program have the extension pas). The C-like programming languages commonly use global function or a static method called main which can be located in any of the source code files of the project.

Delphi identifiers types, variables, and equally keywords read insensitive: eg ID SomeVar fully equivalent samovar.

The source files pas (which, as a rule, and contain the main body of the program) at the level of language means introduced the strict separation of the interface section and the implementation section. The interface contains only a part of ad types and methods, while the implementation of the code in the interface part is not permitted at the level of the compilation. This division also characteristic to the languages ​​ C++ / C++, where the division into the header and the actual implementation files is introduced, but this separation is not provided at the level of language or compiler.

In Delphi method or function are clearly defined reserved for that keywords procedure or function, whereas in the C-like languages ​​the difference is caused by defining the return type. The keywords begin and end mark a beginning and ending of the program block, while in the C-like programming language curly braces {} are used for these purposes. Thus, Delphi achieved a better readability.

Software created on Delphi

  • Products Embarcadero: Embarcadero Delphi, Embarcadero C ++ 1 and version 2.
  • Administration and development of databases: MySQL Tools, IBExpert.
  • Engineering Software: Altium Designer, SprutCAM.
  • File Managers: Total Commander, Frigate, ViewFD, FreeCommander.
  • Graphics viewers: FastStone Image Viewer, FuturixImager, drComRead.
  • Graphics Editor: IcoFX.
  • Video and audio players: Light Alloy, The KMPlayer, AIMP, X-Amp, Nata Player.
  • instant messaging: QIP 2012, R&Q, The Bat!, PopTray, FeedDemon, MyChat.
  • File-sharing clients: Shareman.
  • Music making: FL Studio, Guitar Pro (up to version 6.0).
  • Software development  : Dev-C++, DUnit, Game Maker, Inno Setup, PyScripter.
  • Web Development: Macromedia HomeSite, PHPEdit.
  • Text editors: BirEdit, Notepad GNU, Bred, PSPad.
  • Accounting and taxation: «Бюджет 21», «Парус», AVARDA (up to version 6.x included).
  • The system of electronic queuing: «МАКСИМА».
  • Program storage and processing of medical images: Worsktation, Makhaon Storage Makhaon
  • Software for creating animations: Pivot Stickfigure Animator.
  • Software for data compression: ALZip, PowerArchiver, IZArc.
  • Finding and destroying Malware: Spyware and Spybot - Search & Destroy.
  • Computer games: Age of Wonders, Space Rangers, Space Rangers HD: Venom. Codename: Outbreak, Space Empires V, «Правда о девятой роте».
  • Portable launcher programs: PortableApps.
  • Disk Defragmenter: SmartDefrag.
  • Various system utilities: TreeSize.


  1. Wikipedia(russian)