Mega Code Archive

 
Categories / Delphi / Examples
 

Compilerswitch {} [delphi 2- 3 only]

Delphi since version 2 can tell you about minor errors in your code such as declaring a variable and not using it or writing to a variable and not using the stored value. By default, the hints and wanings are switched off. You can switch them on either on a global level (for all units in a project): To view these hints for an entire project, open the Project Options dialog box, go on the Compiler page and select the Show Hints checkbox. even within a small section of a given unit. To view only the hints that apply to a section of code, use the {$HINTS ON} and {$HINTS OFF} compiler directives, as shown below: {$HINTS ON} procedure aProc; var X : Integer; begin ShowMessage('X is not used'); end; {$HINTS OFF}