Reference & Resources »

Delphi's Reserved Words

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

Delphi's 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,...

DelphiLand Club
Become a member of the DelphiLand Club and get:
  • our Crash Course Delphi
  • the fully commented source code of numerous projects
  • tested and quick answers from our team on the DelphiLand Forum
A
 absolute 
 abstract
 add
 and
 AnsiChar *
 AnsiString *
 Application *
 array
 as
 asm
 assembler
 at
 automated
B
 begin
 Boolean *
 Byte *
 ByteBool *
C
 Cardinal *
 case
 cdecl
 Char *
 class
 Comp *
 const
 constructor
 contains
 Currency *
D
 default
 deprecated
 destructor
 dispid
 dispinterface
 div
 do
 Double *
 downto
 dynamic
E
 else
 end
 except
 Exception *
 export
 exports
 Extended *
 external
F
 false *
 far
 file
 final
 finalization
 finally
 for
 forward
 function
G
 goto
I
 if
 implementation
 implements
 in
 index
 inherited
 initialization
 inline
 Int64 *
 Integer *
 interface
 is
L 
 label
 library
 LongInt *
 local
 LongBool *
 LongWord *
M
 message
 mod
N
 name
 near
 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
 Self *
 set
 shl
 Single *
 ShortInt *
 ShortString *
 shr
 SmallInt *
 static
 stdcall
 stored
 strict private
 strict protected 
 string
T
 then 
 threadvar 
 to
 true * 
 try 
 type
U
 uint64 
 unit 
 unsafe 
 until 
 uses 
V
 var 
 varargs
 Variant *
 virtual
W
 while
 WideChar *
 WideString *
 with 
 Word *
 WordBool * 
 write
 writeonly
 xor

Related articles:

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

© Copyright 1999-2016 
Studiebureau Festraets