?? [Warning]...: For loop control variable must be simple local variable

From: Tom de Neef (tdeneef_at_qolor.nl)
Date: 01/23/05

  • Next message: Rob Kennedy: "Re: ?? [Warning]...: For loop control variable must be simple local variable"
    Date: Sun, 23 Jan 2005 18:46:39 +0100
    
    

    I do not understand why this message:

    [Warning] ... : For loop control variable must be simple local variable

    is reported in this case (D6):

    unit blabla
    ...
    var k : integer;
    initialization
      for k:=0 to 5 do keyTrend[k]:=ThtmlSingleTrend.create;

    finalization
      for k:=5 downto 0 do keyTrend[k].free;
    end.

    The compiler accepts the for-loop in the initialization section. The message
    results from the finalization section.
    Tom


  • Next message: Rob Kennedy: "Re: ?? [Warning]...: For loop control variable must be simple local variable"

    Relevant Pages

    • 2.6.0-test11 intio.o build errors
      ... drivers/scsi/ini9100u.c:146: warning: initialization from incompatible ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: memory management in Ada: tedious without GC?
      ... Why not to perform initialization of ... actions of finalization. ... bounds, but not for discriminants. ...
      (comp.lang.ada)
    • [SLE] Shape it plugin
      ... shapeit.c:56: error: parse error before '*' token ... shapeit.c:76: warning: initialization makes integer from pointer without ... shapeit.c:106: warning: type defaults to `int' in declaration of ...
      (SuSE)
    • Re: Avoiding "unused dummy argument" warnings.
      ... warning and when not. ... of intentand default initialization counts as a "use". ... kinds of things that the assignment statement would in terms of flagging ... always do (truncate and/or pad). ...
      (comp.lang.fortran)
    • ip_wccp module and squid with RHEL 3 AS
      ... However, I always get compilation errors when trying it on RHEL 3, while it ... ip_wccp.c:133: warning: (near initialization for `ipwccp_protocol') ... ip_wccp.c:134: warning: excess elements in struct initializer ...
      (RedHat)