Re: delete cookies

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

"SW" <s_tka…@infonet.by> wrote in message
news:C7749810B1B1E240s_tka…@infonet.by...

> 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

or:

    for ActLc := Pred(ActNcook) downto 0 do

Gambit

Replies

In response to

delete cookies posted by SW on Mon, 25 Oct 2004