Delphi Error – Hints

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.

Share:

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

Delphi Compiler Error E2313 Attribute – Known attribute cannot specify properties Reason for the Error & Solution No further information...
Delphi Compiler Error E2379 Virtual methods not allowed in record types Reason for the Error & Solution No further information...
Rodrigo , one of the long time Delphi Developer has been working on one of his personal project “Delphi IDE...