Embarcadero Delphi

Getting started with Embarcadero Delphi

Remarks#

Delphi is a general-purpose language based on an Object Pascal dialect with its roots coming from Borland Turbo Pascal. It comes with its own IDE designed to support rapid application development (RAD).

It allows cross-platform native (compiled) application development from a single code base. Currently supported platforms are Windows, OSX, iOS and Android.

It comes with two visual frameworks:

  • VCL: Visual Component Library specifically designed for Windows development wrapping Windows native controls and support for creating custom ones.
  • FMX: FireMonkey cross-platform framework for all supported platforms

Versions#

VersionNumeric versionProduct nameRelease date
11.0Borland Delphi1995-02-14
22.0Borland Delphi 21996-02-10
33.0Borland Delphi 31997-08-05
44.0Borland Delphi 41998-07-17
55.0Borland Delphi 51999-08-10
66.0Borland Delphi 62001-05-21
77.0Borland Delphi 72002-08-09
88.0Borland Delphi 8 for .NET2003-12-22
20059.0Borland Delphi 20052004-10-12
200610.0Borland Delphi 20062005-11-23
200711.0CodeGear Delphi 20072007-03-16
200912.0CodeGear Delphi 20092008-08-25
201014.0Embarcadero RAD Studio 20102009-08-15
XE15.0Embarcadero RAD Studio XE2010-08-30
XE216.0Embarcadero RAD Studio XE22011-09-02
XE317.0Embarcadero RAD Studio XE32012-09-03
XE418.0Embarcadero RAD Studio XE42013-04-22
XE519.0Embarcadero RAD Studio XE52013-09-11
XE620.0Embarcadero RAD Studio XE62014-04-15
XE721.0Embarcadero RAD Studio XE72014-09-02
XE822.0Embarcadero RAD Studio XE82015-04-07
10 Seattle23.0Embarcadero RAD Studio 10 Seattle2015-08-31
10.1 Berlin24.0Embarcadero RAD Studio 10.1 Berlin2016-04-20
10.2 Tokyo25.0Embarcadero RAD Studio 10.2 Tokyo2017-03-22

Hello World

This program, saved to a file named HelloWorld.dpr, compiles to a console application that prints “Hello World” to the console:

program HelloWorld;

{$APPTYPE CONSOLE}

begin
  WriteLn('Hello World');
end.

Show ‘Hello World’ using the VCL

This progam uses VCL, the default UI components library of Delphi, to print “Hello World” into a message box. The VCL wrapps most of the commonly used WinAPI components. This way, they can be used much easier, e.g. without the need to work with Window Handles.

To include a dependency (like Vcl.Dialogs in this case), add the uses block including a comma-separated list of units ending with an semicolon.

program HelloWindows;

uses
  Vcl.Dialogs;

begin
  ShowMessage('Hello Windows');
end.

Show ‘Hello World’ Using WinAPI MessageBox

This program uses the Windows API (WinAPI) to print “Hello World” into a message box.

To include a dependency (like Windows in this case), add the uses block including a comma-separated list of units ending with an semicolon.

program HelloWorld;

uses
  Windows;

begin
  MessageBox(0, 'Hello World!', 'Hello World!', 0);
end.

Cross-platform Hello World using FireMonkey

program CrossPlatformHelloWorld;

uses
  FMX.Dialogs;

{$R *.res}

begin
  ShowMessage('Hello world!');
end.

Most of the Delphi supported platforms (Win32/Win64/OSX32/Android32/iOS32/iOS64) also support a console so the WriteLn example fits them well.

For the platforms that require a GUI (any iOS device and some Android devices), the above FireMonkey example works well.


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow