Re: delete cookies

Giganews Newsgroups
Subject: Re: delete cookies
Posted by:  Remy Lebeau (TeamB) (
Date: Mon, 25 Oct 2004

"SW" <s_tka…> wrote in message

> Delphi pops up the exception 'List index out of bounds'.

When you delete items from inside a loop, then you should be looping
backwards, not forwards, otherwise your loop counter gets messed up each
time you delete an item.  Do this instead:

    for ActLc := (ActNcook-1) downto 0 do


    for ActLc := Pred(ActNcook) downto 0 do



In response to

delete cookies posted by SW on Mon, 25 Oct 2004