I am seeing this on random places after parameters in function calls. I know about $ directives, so is % something different, or is that meant as a comment?
Mailing lists / lazarus / 2013-04
What is {%H-}?
14 messages · 9 people ·
- MMark Morgan Lloyd 3
- AAlexander Klenin 2
- MMattias Gaertner 2
- SSven Barth 2
- BBart 1
- FFlorian Klämpfl 1
- +3 more
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
I am seeing this on random places after parameters in function calls. I know about $ directives, so is % something different, or is that meant as a comment?
http://wiki.freepascal.org/IDE_directives
Mattias
Mattias Gaertner wrote
Quote:
Hint: You can right click on a hint in the message window and click on "hide message via directive" to insert the directive automatically.
Very nice!
Bart
On Fri, 05 Apr 2013 09:33:20 +0200 http://wiki.freepascal.org/IDE_directives Mattias
Mattias Gaertner wrote 8 lines
Question if I may: does this imply that the FPC error numbers are "graven in stone", i.e. new errors will always be added at the end of the list even if it would make more sense to have them in the middle?
Mark Morgan Lloyd wrote 14 lines
The list has big enough holes and renumbering is _very_ unlikely.
Question if I may: does this imply that the FPC error numbers are "graven in stone", i.e.…
Show quoted text 17 lines
FPC error numbers are graven stone. Although new errors are added all the time and some of them have higher precedence.
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-}.
Mattias
Mattias Gaertner wrote 6 lines
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.
The list has big enough holes and renumbering is _very_ unlikely.
Florian Kl?mpfl wrote 15 lines
Thanks Florian.
FPC error numbers are graven stone. Although new errors are added all the time and some…
Mattias Gaertner wrote 24 lines
Thanks, detail noted. Also somebody else's
| Quote:
| Hint: You can right click on a hint in the message window and click on | "hide message via directive" to insert the directive automatically.
On Fri, Apr 5, 2013 at 7:32 PM, Mattias Gaertner I seriously dislike this solution,…
Alexander Klenin wrote 13 lines
Agreed, this would be great.
Henry
Henry Vermaak wrote 13 lines
I know that it is kind of a repetive mantra, but:
Patches are welcome :) [at least it increases the chance that something is implemented]
Though I currently don't know what would be better: a compiler directive or a function with a untyped var/const parameter... (the latter could allow to use the code with Delphi as well as only that function needs to be implemented)
Regards,
Sven
On Fri, Apr 5, 2013 at 7:32 PM, Mattias Gaertner I seriously dislike this solution,…
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)
Alexander Klenin wrote 26 lines
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20130405/6f81a3c1/attachment.html>
Kostas Michalopoulos wrote 11 lines
Originally I wanted to suggest this as well, but it does not allow you to specifically select which parameters to ignore. Though this will depend on whether the user wants to generally disable the message or only disable for selected functions or specific parameters...
Regards,
Sven
Sven Barth wrote 12 lines
True. It is also much less readable.
