Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2004-09

Re: Hints and Warning enabled and disabled

5 messages · 4 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Darek Mazur
to Michael Van Canneyt
Użytkownik Michael Van Canneyt wrote 13 lines
On Wed, 22 Sep 2004, Darek Mazur wrote: >Hi >Is it possible to enable and disable warning and hints receiving from compiler, >but not in command line only in directives in program >like >{$HINT ON}{$HINT OFF} It is {$HINTS ON}

Its not work for me
example:

program testapp

uses
     classes,
{$HINTS OFF}
    buttons
{$HINTS ON}
;
begin
   writeln('test');
end.
Compiler hint
testapp.pp(11,7) Hint: Unit "BUTTONS" not used in TESTAPP

I need this because I have include file with most uses modules, and I want exclude some of this hints.

Darek

Show quoted text 11 lines
and {$WARNINGS ON} Michael. _______________________________________________ fpc-devel maillist - http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply by email

Darek Mazur

Hi
Is it possible to enable and disable warning and hints receiving from compiler, but not in command line only in directives in program like
{$HINT ON}{$HINT OFF}

I found only HINT, but it seems not to be work (its off for whole program not only for module)

Darek

Reply by email

Tomas Hajny
to Darek Mazur: Its not work for me example: program testapp uses {$HINTS OFF} buttons {$HINTS ON} ; begin

From: Darek Mazur
To:
Subject: Re: [fpc-devel]Hints and Warning enabled and disabled Date sent: Wed, 22 Sep 2004 18:57:30 +0200

Show quoted text 31 lines
Użytkownik Michael Van Canneyt napisał: > > On Wed, 22 Sep 2004, Darek Mazur wrote: > >>Hi >>Is it possible to enable and disable warning and hints receiving >>from compiler, but not in command line only in directives in program >>like {$HINT ON}{$HINT OFF} > > It is > {$HINTS ON} Its not work for me example: program testapp uses classes, {$HINTS OFF} buttons {$HINTS ON} ; begin writeln('test'); end. Compiler hint testapp.pp(11,7) Hint: Unit "BUTTONS" not used in TESTAPP

It looks OK to me - the listed hint is only issued at the end of testapp.pp parsing, and hints are turned on at that place?

Tomas

Reply by email

Unknown author
to Tomas Hajny
Tomas Hajny wrote 39 lines
From: Darek Mazur To: Subject: Re: [fpc-devel]Hints and Warning enabled and disabled Date sent: Wed, 22 Sep 2004 18:57:30 +0200 > U�ytkownik Michael Van Canneyt napisa�: > > > > On Wed, 22 Sep 2004, Darek Mazur wrote: > > > >>Hi > >>Is it possible to enable and disable warning and hints receiving > >>from compiler, but not in command line only in directives in program > >>like {$HINT ON}{$HINT OFF} > > > > It is > > {$HINTS ON} > > Its not work for me > example: > > program testapp > > uses > classes, > {$HINTS OFF} > buttons > {$HINTS ON} > ; > > > begin > writeln('test'); > end. > > Compiler hint > testapp.pp(11,7) Hint: Unit "BUTTONS" not used in TESTAPP It looks OK to me - the listed hint is only issued at the end of testapp.pp parsing, and hints are turned on at that place?

Exactly.
Just use hints off right before the final end.

program testapp

uses
classes,

    buttons;
begin
  Writeln('test');
{$hints off}
end.

Reply by email