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. Also avoid names of "classes" that are
commonly used in Delphi, such as: TActionList, TCheckBox, TComponent, TControl, TGroupBox, TImage, TMemo, TPanel,
TObject, TPopupMenu, TRadioButton, TRadioGroup, TScrollBar and so on.
Avoid | Already used as... |
Action | property |
Align | property |
Application | object |
AutoSelect | property |
BevelWidth | property |
BorderWidth | property |
Caption | property |
clRed | constant |
clWhite | constant |
Color | property |
Cursor | property |
Enabled | property |
Font | property |
Height | property |
Hide | method |
Hint | property |
Avoid | Already used as... |
Icon | property |
ItemIndex | property |
Left | property |
Menu | property |
Name | property |
OnActivate | event |
OnClick | event |
OnClose | event |
OnCreate | event |
OnDeactivate | event |
OnDestroy | event |
OnHide | event |
OnDestroy | event |
OnKeyDown | event |
OnKeyPress | event |
OnKeyUp | event |
OnMouseDown | event |
OnMouseDown | event |
OnShow | event |
Avoid | Already used as... |
ParentColor | property |
ReadOnly | property |
Screen | object |
Self | object |
Show | method |
ShowHint | method |
Tag | property |
TButton | class |
TEdit | class |
Text | property |
TForm | class |
TLabel | class |
Top | property |
Visible | property |
Width | property |
|
|