[Lazarus] FW: Re: more file operation problems

Sven Barth pascaldragon at googlemail.com
Mon Dec 12 21:22:20 CET 2011


Am 12.12.2011 21:20 schrieb "Sven Barth" <pascaldragon at googlemail.com>:
>
> Am 12.12.2011 21:05 schrieb "Chris Kelling" <kellingc at cox.net>:
>
> > That worked, but now, later in the code:
> >
> >  rowNum := 1;
> >  while rowNum <= stgInvOps.RowCount do
> >        begin
> >          read(inventory,stock);
> >          stgInvOps.Cells[0,rowNum] := inttostr(stock.ClassNumber);
> >          inc(rowNum);
> >        end;
> >   closefile(inventory);
> >
>
> Replace the "<=" condition by "<". The row indices go from 0 to
RowCount-1.

And replace the "rowNum := 1" by "rowNum := 0" of course.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20111212/c5d00a50/attachment-0003.html>


More information about the Lazarus mailing list