function fieldLength(fieldno : Integer): Integer;

The function fieldLength() returns a length of a field by index.
It returns 0 if index is out of range.


begin
    // your code
    for i := 0 to dbf.fieldCount-1 do
        writeln( intToStr( dbf.fieldLength( i ) ) );
    // your code
end;