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 X2421 Imported identifier ‘%s’ conflicts with ‘%s’ in ‘%s’ Reason for the Error & Solution This occurs...
Delphi Compiler Error X2367 Case of property accessor method %s.%s should be %s.%s Reason for the Error & Solution No...
Delphi Compiler Error X2269 Overriding virtual method ‘%s.%s’ has lower visibility (%s) than base class ‘%s’ (%s) Reason for the...