Sign in Join

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

Mailing lists / fpc-devel / 2007-04

Re: : Add option/directive to ignore "Parameter X not used" hint

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Micha Nelissen
The "Parameter X not used" hint is specially annoying in the case you use many callback functions like the used in LCL (TNotifyEvent and alike).

Perhaps it's an idea to not show this hint by default for methods declared in the published section of a class ? Most likely they are callbacks.

Micha

Reply by email

Flávio Etrusco
to Micha Nelissen
Micha Nelissen wrote 9 lines
wrote: > The "Parameter X not used" hint is specially annoying in the case you use > many callback functions like the used in LCL (TNotifyEvent and alike). Perhaps it's an idea to not show this hint by default for methods declared in the published section of a class ? Most likely they are callbacks. Micha

Virtual methods could very probably join the dance ;-)

Cheers,
Flávio

Reply by email

Luiz Americo Pereira Camara
to Micha Nelissen: Perhaps it's an idea to not show this hint by default for methods declared in the…
Micha Nelissen wrote 10 lines
wrote: > The "Parameter X not used" hint is specially annoying in the case you use > many callback functions like the used in LCL (TNotifyEvent and alike). > Perhaps it's an idea to not show this hint by default for methods declared in the published section of a class ? Most likely they are callbacks.

It would be good but i don't know if this is possible. In the Lazarus situation, the procedure (event) is added to the public section, so fpc can not know if is assigned to a published property or not.

The original idea was a local directive like {$PARAMETER_HINT +/-} or (a bit overkill/superfluous) {$IGNORE_PARAMETER [name of parameter]}

Luiz

Reply by email

Micha Nelissen
to Flávio Etrusco: Virtual methods could very probably join the dance ;-) Flávio
Flávio Etrusco wrote 6 lines
On 4/14/07, Micha Nelissen wrote: > Perhaps it's an idea to not show this hint by default for methods > declared in the published section of a class ? Most likely they are > callbacks. Virtual methods could very probably join the dance ;-)

In my experience, those are less troublesome; callbacks are usually more generically designed (what the callee may possibly need). Nevertheless, that could work well, as well :-).

Regards,

Micha

Reply by email