Delphi Compiler Error
Hints
Reason for the Error & Solution
|
Type |
Switch |
|
Syntax |
{$HINTS ON} or {$HINTS OFF} |
|
Default |
{$HINTS ON} |
|
Scope |
Local |
Remarks
The $HINTS directive controls the generation of hint messages by the Delphi compiler.
In the {$HINTS ON} state, the compiler issues hint messages when detecting unused variables, unused assignments, for or while loops that never execute, and so on. In the {$HINTS OFF} state, the compiler generates no hint messages.
By placing code between {$HINTS OFF} and {$HINTS ON} directives, you can selectively turn off hints that you don’t care about. For example,
{$HINTS OFF}
procedure Test;
var
I: Integer;
begin
end;
{$HINTS ON}
Because of the $HINTS directives the compiler will not generate an unused variable hint when compiling the procedure above.