[Lazarus] more file operation problems

Chris Kelling kellingc at cox.net
Mon Dec 12 18:09:14 CET 2011


I'm trying to assign the number of records to the rowCount of a 
stringgrid control.  See the following code fragment:

var
   stock  : stockitem;
   rowNum : integer;
   {inventory is defined as a file of stockitem in another unit}

begin
   assignfile(inventory,'Ops');
   reset(inventory);
   stgInvOps.RowCount:= filesize(inventory);

When I compile the program, I get:

dashboard.pas(115,42) Error: Incompatible type for arg no. 1: Got "File 
Of StockItem", expected "AnsiString" with 'inventory' highlighted
on the line "stgInvOps.RowCount:= filesize(inventory);"

What am I doing wrong?

-Chris




More information about the Lazarus mailing list