[Lazarus] What is {%H-}?
Kostas Michalopoulos
badsectoracula at gmail.com
Fri Apr 5 14:52:50 CEST 2013
You can use this:
{$PUSH}{$WARN 5024 OFF}
// Code where you dont want to get warnings about unused parameters
{$POP}
(you can put the push at the top of the implementation part of a unit and
you wont get warnings for the rest of that unit)
On Fri, Apr 5, 2013 at 10:43 AM, Alexander Klenin <klenin at gmail.com> wrote:
> On Fri, Apr 5, 2013 at 7:32 PM, Mattias Gaertner
> <nc-gaertnma at netcologne.de> wrote:
> >
> > This is independent of the IDE directive {%H-}. It only works on the file
> > position given by the compiler.
> >
> > Newer compilers might warn at different places within an expression, so
> > sometimes you have to add two {%H-}.
>
> I seriously dislike this solution, especially for the most frequent
> case of unused parameters --
> not only it is a hack, it also does not work while compiling from command
> line.
> I would much prefer either {$UNUSED var} compiler directive, or, failing
> that,
> Unused(var) library call -- similar to what is done in TAChart.
>
> --
> Alexander S. Klenin
>
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20130405/6f81a3c1/attachment-0003.html>
More information about the Lazarus
mailing list