great:

if (sender = nil)then begin end;

that solves the problem. I like it.

On the same idea, I usually wtite:

...
myprocedure;
var
mystring : string;
begin 
...
str(Myreal,mystring);
...

but I get the warning:

"variable "mystring" does not seem to be initialized"

What is it that I am doing wrong? The program works of course, but I
want to know the best way to do it. 

thanks

Alain




On Wed, 2006-04-26 at 03:45 +0000, Tony Pelton wrote:
> On 4/26/06, Alain Michaud <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> >  what does the following compiler message means?
> > Hint: parameter "Sender" not used
> 
> this gets discussed from time to time.
> 
> widget event protos require the sender param, but often, the
> implementation doesn't use it, so you end up with an "unused"
> parameter, which the compiler warns about.
> 
> > Is there something that I can do to improve my source code apart from
> > just ignoring the message?
> 
> ignoring it is one option.
> 
> you could also "use" it, the parameter that is, using a no-op to make
> the compiler think it is being used.
> 
> there are some suggested variations on this, such as "if(Sender :=
> nil)" as one of them.
> 
> i think i remember the FPC people talking about making this an
> optional hint in the compiler at some point as well.
> 
> maybe for 2.1.1 or something.
> 
> >
> > Alain
> 
> Tony
> 
> --
> X-SA user ? 0.5.1 is out !
> XData 0.1 for X-SA is out !
> http://x-plane.dsrts.com
> http://games.groups.yahoo.com/group/x-plane-foo/

_________________________________________________________________
     To unsubscribe: mail [EMAIL PROTECTED] with
                "unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives

Reply via email to