Show: Delphi C++
Display Preferences

Hints (Delphi)

From RAD Studio
Jump to: navigation, search

Go Up to Delphi Compiler Directives (List) Index

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.

Personal tools
RAD Studio 10.2 Tokyo
In other languages
Previous Versions
Assistance