RAD Studio (Common)
ContentsIndex
PreviousUpNext
Warnings (Delphi)
Type  
Switch  
Syntax  
{$WARNINGS ON} or {$WARNINGS OFF}  
Default  
{$WARNINGS ON}  
Scope  
Local  

Remarks 

The $WARNINGS directive controls the generation of compiler warnings. The $WARN directive lets control the display of groups of warning messages.  

In the {$WARNINGS ON} state, the compiler issues warning messages when detecting uninitialized variables, missing function results, construction of abstract objects, and so on. In the {$WARNINGS OFF} state, the compiler generates no warning messages. 

By placing code between {$WARNINGS OFF} and {$WARNINGS ON} directives, you can selectively turn off warnings that you don't care about.

Note: Note: The $WARNINGS directive only works at the procedure or function level granularity. That is, you can surround entire procedures and functions with the $WARNINGS directive, but not blocks of statements within a procedure or function.

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!