Delphi Pascal is one of many object-oriented variants of Pascal. Overthe years, Delphi has evolved and is no longer recognizable as thePascal you used in school all those many years ago. In addition tounit-based modular programming and a robust class model, DelphiPascal has a number of other modern language features, including thefollowing:
Delphi started as a Windows programming language and environment, andmany Delphi programmers (myself included) consider Delphi to be thebest Windows development tool available. Delphi includes full supportfor COM and ActiveX, an object-oriented widget library (called theVisual Component Library, or VCL), and a rapid-applicationdevelopment environment that is extensible and customizable.
Delphi for Linux
As I write this, Borland is hard at work porting Delphi to Linux.Perhaps when you read this, Delphi for Linux will be available,bringing its integrated development environment to X-Windows,including its WYSIWYG form editor, multi-tier database support, andfull CORBA support.
Until Borland finishes this work and releases Delphi for Linux, I canonly speculate about how the final product will look. (No, Idont get any special inside information.) You can rely on thecore language being the same in both Delphi for Linux and Delphi forWindows, including classes, objects, interfaces, strings, dynamicarrays, exceptions, and the basic data types. Most of the built-insubroutines will work the same under Linux as under Windows.
Some language features described in this book are clearly Windowsspecific, such as the CmdShow
andDllProc
variables or theFindHInstance
function. If you want to write codethat is portable between Windows and Linux, you must avoid theseWindows-specific features.
Delphi for Windows is the best development environment for writingWindows applications and libraries. To attain this premier position,Delphi has incorporated a number of Windows-specific features.Borland has a goal of making Delphi for Linux the best Linuxdevelopment environment. To achieve that goal, we can expect Delphito include some Linux-specific features.
Im just guessing, but I believe it will be feasible to writecode that is portable between Windows and Linux. However, you willhave to sacrifice some features that are unique to each environment.Writing components that are easily portable, especially interactivecontrols, will probably be a daunting task. Making an applicationthat is portable will most likely be easier.
About This Book
The first four chapters of this book present information on how touse Delphi effectively, and subsequent chapters form the languagereference proper.
to learn about the new and niftyfeatures in Delphi Pascal. You might be surprised at how far thelanguage has come over the years.
to learn thedifferences between Delphi and other languages, such as Java and C++.
tells you everything there is to know aboutRTTI, and then some.
, is about using Delphi in a modern,multithreaded, multiprocessor world. Delphi includes several languagefeatures to help you write multithreaded applications, but thesefeatures can be difficult to use if you do not have much experiencewith the tricks and traps of multithreaded programming. This chaptergets you started using Delphi effectively to write modernapplications.
, is the bulk of the book. Thealphabetical reference lists every keyword, directive, subroutine,type, and variable in the Delphi Pascal language and its systemunits. Full examples show you how to use the language correctly andeffectively.
is large enough without adding theseliterals. Moving them to a separate chapter makes the completereference easier to use.
, describes all the arithmetic and otheroperators in Delphi Pascal. Symbols do not alphabetize well, solisting the symbol operators in their own chapter makes it easier tofind information about a particular operator.
, lists all the special comments that youcan include in your source code to control how Delphi compiles andlinks your program.
, describes the usage and options for thevarious command-line tools that come with Delphi. These tools are notrelated to the Delphi Pascal language, but they are often overlookedand can be extremely useful for the Delphi professional.
, lists all the subroutines, types, andvariables in the SysUtils
unit. This unit is notbuilt into the compiler (as the System
unit is).It is not part of the Delphi Pascal language, but is part ofDelphis runtime library. Nonetheless, many Delphiprofessionals have come to rely on SysUtils
asthough it were part of the language, and indeed, many subroutines inSysUtils
are superior to their equivalents in theSystem
unit (such as AnsiPos
instead of Pos
).
Conventions Used in This Book
The following typographical conventions are used in this book:
Constant width
Used for Delphi identifiers and symbols, including all keywords anddirectives. In the language reference, constant width shows thesyntax elements that must be used exactly as shown. For example, thearray declaration requires the square brackets and other symbols, andthe type
, array
, andof
keywords to be used as shown:
type
Name
= array[
Index
type
, ...] of
Base
type
;
Constant width italic