Sign in Join

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

Mailing lists / fpc-devel / 2005-03

TStrings.CheckSpecialChars broken

10 messages · 8 people · –

Reply by email Subscribe to this list Your subscription

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

Marc Weustink

Hi,

The TStrings.CheckSpecialChars is missing a not. Now the special chars are never initialized :(

Marc

Index: stringl.inc
=================================================================== RCS file: /FPC/CVS/fpc/rtl/objpas/classes/stringl.inc,v retrieving revision 1.9
diff -r1.9 stringl.inc
50c50
< If FSpecialCharsInited then
---

If not FSpecialCharsInited then

Reply by email

Uberto Barbini
to Unknown author

This is not a big issue, anyway could we avoid the endless list of such similar hints compiling Lazarus and our program?

Don't make me wrong, I apreciate the hints of the compiler. 9 times out of 10 if I don't use a parameter in a function or a method there it is an error of mine.
But in published methods the parameter list is mandatory, so it doesn't make sense to "hint" them.
Moreover they hide real hints.

Bye Uberto

Reply by email

Jeff Pohlmeyer
This is not a big issue, anyway could we avoid the endless list of such similar hints compiling Lazarus and our program?

I frequently find a similar annoyance with c library callbacks.

For instance, most gtk functions have a "user_data" parameter that is often unused.

Maybe there could be a procedure directive and/or compiler switch to ignore unsused parameter hints on prototyped functions, or perhaps to turn this particluar hint off completely?

Or even a "dummy" function like: Ignore(Sender);

- Jeff

__________________________________ Do you Yahoo!? Yahoo! Small Business - Try our new resources site! http://smallbusiness.yahoo.com/resources/

Reply by email

Ales Katona
to Jeff Pohlmeyer

Jeff Pohlmeyer wrote / napísal (a):

Show quoted text 25 lines
>This is not a big issue, anyway could we avoid the endless list >of such similar hints compiling Lazarus and our program? > > I frequently find a similar annoyance with c library callbacks. For instance, most gtk functions have a "user_data" parameter that is often unused. Maybe there could be a procedure directive and/or compiler switch to ignore unsused parameter hints on prototyped functions, or perhaps to turn this particluar hint off completely? Or even a "dummy" function like: Ignore(Sender); - Jeff

I agree. Something to turn of only parameter unused variables checks. It's not critical or anything but I think it might be good if it made it to 2.0
I'm not sure but doesn't Delphi actualy ignore unused parameters?

Ales

Reply by email

Peter J. Haas
to Uberto Barbini: This is not a big issue, anyway could we avoid the endless list of such similar hints…

Hi Uberto,

Uberto wrote 9 lines
This is not a big issue, anyway could we avoid the endless list of such similar hints compiling Lazarus and our program? Don't make me wrong, I apreciate the hints of the compiler. 9 times out of 10 if I don't use a parameter in a function or a method there it is an error of mine. But in published methods the parameter list is mandatory, so it doesn't make sense to "hint" them. Moreover they hide real hints.

I agree.

I have (unsuccessful) try to post a similar mail in the fpc pascal list.

But what do you mean with published methods? The published section is intended only for properties, which should be published in the object inspector. I guess you mean event methods. Beside event methods, callback functions and virtual methods could be affected too.

My main problem, if I hide the hint by using

{$HINTS OFF}
...
{$HINTS ON}

I remove all useful hints as well.

wkr Peter.

Reply by email

Uberto Barbini
to Peter J. Haas
But what do you mean with published methods? The published section is intended only for properties, which should be published in the object inspector. I guess you mean event methods. Beside event methods, callback functions and virtual methods could be affected too.

Yes, it means anything only in static private/protected methods and in pure functions/procedures.
Completely removing it (optionally) could be a good solution too, Delphi hasn't and I never missed it.

Show quoted text 8 lines
My main problem, if I hide the hint by using {$HINTS OFF} ... {$HINTS ON} I remove all useful hints as well.

Yes! Exactly my point. But now the useful hints are sunk into tons of completely useless ones.

Bye
Uberto

Reply by email

Florian Klaempfl
to Uberto Barbini
Uberto Barbini wrote 23 lines
>But what do you mean with published methods? The published section is >intended only for properties, which should be published in the object >inspector. I guess you mean event methods. Beside event methods, >callback functions and virtual methods could be affected too. Yes, it means anything only in static private/protected methods and in pure functions/procedures. Completely removing it (optionally) could be a good solution too, Delphi hasn't and I never missed it. >My main problem, if I hide the hint by using > >{$HINTS OFF} >... >{$HINTS ON} > >I remove all useful hints as well. Yes! Exactly my point. But now the useful hints are sunk into tons of completely useless ones.

Make your own error.msg file and change the hints you don't want to see into notes or comments.

Reply by email

Uberto Barbini
to Florian Klaempfl
Show quoted text 5 lines
> Yes! Exactly my point. But now the useful hints are sunk into tons of > completely useless ones. Make your own error.msg file and change the hints you don't want to see into notes or comments.

Are you suggesting this as "quick hack" or do you find useful those hints? Are you theorically against it?

I'd like it but it doesn't worth the changing of error.msg.

Bye Uberto

Reply by email

Peter Vreman
to Uberto Barbini
Show quoted text 10 lines
> > Yes! Exactly my point. But now the useful hints are sunk into tons of > > completely useless ones. > > Make your own error.msg file and change the hints you don't want to see > into notes or comments. Are you suggesting this as "quick hack" or do you find useful those hints? Are you theorically against it? I'd like it but it doesn't worth the changing of error.msg.

This is a workaround.

For us compiler-developpers it has low priority, IOW don't expect changes soon if we don't get any patches to support toggling specific Hints on/off.

Reply by email