Reference & Resources

Delphi (and Lazarus)  Reserved Words

Below you find a list of Delphi's and Lazarus's reserved words and some "dangerous" words that you should avoid as identifiers in your programs.

Reserved words cannot be redefined or used as identifiers, such as: begin, function, if, procedure,... In addition to these, other words (such as at, on,...) act like reserved words.

As an example, the following declarations are illegal:

const Function = 1; // FUNCTION is a reserved word!
var Begin: integer; // BEGIN is a reserved word!

Also directives (such as absolute, default,...) have special meanings in the Delphi language. Although it isn't strictly forbidden to use them for identifiers, in a lot of cases this gives errors. Therefore we included them also in our list.

Finally we included some words that are not really forbidden, but that can lead to very difficult to debug errors. We advise you to also avoid them as identifiers in your code. These words are marked with a star (*) such as: application, integer, real,...
For more on "dangerous" words, see words to avoid.

A
 absolute *
 abstract *
 add
 and
 AnsiChar *
 AnsiString *
 Application *
 array
 as
 asm
 assembler *
 at
 automated *
B
 begin
 Boolean *
 break
Byte * ByteBool * C Cardinal * case
catch
 cdecl * Char * class Comp * const constructor contains *
continue Currency *
D
 debugger
decimal *
default *
delete deprecated * destructor dispid * dispinterface div do Double * downto dynamic * E else end
enum *
except Exception * export * exports
extends Extended * external * F false far * file final finalization finally
Float *
 for forward * function G get *
goto
I
 if
 implementation
 implements *
import in index * inherited initialization inline *
instanceof
Int *
 Int64 * Integer * interface
internal * is L label library *
Long * LongInt * local * LongBool * LongWord * M message * mod N name * near *
new nil null nodefault * not O of on or out overload override *
P
 package *
 packed
 PAnsiChar *
 pascal *
 PByteArray *
 PChar *
 PCurrency *
 PDouble *
 PExtended *
 PInteger *
 platform *
 POleVariant *
 private *
 procedure
 program
 property
 protected *
 PSingle *
 PShortString *
 PString *
 PTextBuff *
 public *
 published *
 PVariant *
 PVarRec *
 PWideChar *
 PWideString *
 PWordArray *
R
 raise
 read *
 readonly *
 Real *
 Real48 *
 record
 register *
 reintroduce *
 remove
 repeat
 requires *
 resident *
 resourcestring
S
 safecall *
 sbyte *
Self * set shl Short * ShortInt * ShortString * shr Single *
 SmallInt * static stdcall * stored * strict private strict protected string
super
switch
T
 then
this threadvar
throw to true * try type
typeof U uint *
uint64
ulong * unit unsafe until uses
ushort * V var varargs * Variant * virtual *
void * W while WideChar * WideString * with Word * WordBool * write * writeonly * xor

 

TOP   DelphiLand Club  DC Library  FAQ
Crash Course Delphi  Tips  Source Code  Downloads  Links

© Copyright 1999-2016 
Studiebureau Festraets