2007. július 5., csütörtök

Compilerswitch {$HINTS} (Delphi 2/ 3 only)


Problem/Question/Abstract:

Compilerswitch {$HINTS} (Delphi 2/ 3 only)

Answer:

Delphi 2/3 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 warnings 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}

Nincsenek megjegyzések:

Megjegyzés küldése