Reference & Resources

Which names to avoid?

Delphi's reserved words cannot be redefined or used as identifiers, such as: begin, function, if, procedure,...
See: Forbidden words: Delphi's reserved words

But also other words can lead to very difficult to debug errors, such as:

  • names of objects: Application Screen,...
  • object properties: Color, Height
  • object methods: Hide, Show,...
  • objects events: OnActivate, Onclick,...
  • names of built-in modules: Windows, Messages, Classes,...
  • built-in global constants: clWhite, clRed,...

We strongly advise you to avoid them as identifiers in your source code.
Below you find a non-exhaustive list of Delphi's "dangerous" words that you should avoid as identifiers in your Delphi or Lazarus programs.

A
Action
ActiveControl
Align
 Application
AutoSelect B
BevelWidth
BorderWidth
C
Caption
clRed
clWhite
 Color
Cursor
D E Enabled
F Font
G
H Height
Hide
Hint

property
property
property
object
property

property
property

property
constant
constant
property
property


property

property


property
method
property
I
Icon
ItemIndex L
 Left M
Menu N
Name O
 OnActivate
OnClick
OnClose
OnCreate
OnDeactivate
OnDestroy
OnHide
OnKeydown
OnKeyPress
OnKeyUp
OnMouseDown
OnMouseUp
OnShow

property
property

property

property

property

event
event
event
event
event
event
event
event
event
event
event
event
event
P
ParentColor
R
ReadOnly S Screen
Self
Show
ShowHint
T
Tag
TButton
TEdit
Text
TForm
TLabel
 Top U V
Visible Width

property

property
object
property
method
property

property object
object
property
object
object
property


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

Copyright 1999-2017 
DelphiLand