Re: Two possible bugs (err... undocumented features) in Delphi 7.

From: PM (ask_at_me.for.it)
Date: 11/27/03


Date: Thu, 27 Nov 2003 18:37:53 -0000


"Parmod" <parmod@insyncspeech.com> wrote in message
news:3fc50802$1@newsgroups.borland.com...
> 1) I get a warning message that a variable has been initialized but not
> used. The fact is that the code is using it with mod operator. This
seems
> to be an undesireable feature.
>
> procedure DoSomething;
> var
> Iz: integer;
> begin
> Iz := 0;
> . for .....
> inc(Iz)
> if Iz mod 100 = 0 then
> Beep;
> end;
> end;
<SNIP>

Is your for loop also using Iz as there are no other variables defined? If
the answer is yes, clearly the for loop will overwrite the value, set in the
first line, when it is initialised.

I have personally not come accross problems such as you have described and,
without a full code quote, it's hard to see that this is a Delphi problem or
bug.

This is not the correct group for this question as an aside.



Relevant Pages

  • Re: PHP page wants my clipboard
    ... Just tried it, and yep, in IE7 I get the warning message. ... Now the offending script uses this function. ... Then the for loop comes in: ...
    (uk.net.web.authoring)
  • Re: defmacro parameters
    ... (otherwise (push item (aref statements seen)))) ... Ding ding, we have a WINNER! ... your blackbelt in LOOP:^). ... Extra credit for the WARNING message that ...
    (comp.lang.lisp)
  • Re: Sort + Use of uninitialized value
    ... Inside the loop I check if the value is defined, so I don't care where ... is a warning message). ... I would loop over %dHash until I found the bad ... elsif { ...
    (perl.beginners)