[fpc-pascal] Why TSdfDataSet doesn't simply return FCurRec as RecNo?
Michael Van Canneyt
michael at freepascal.org
Tue Nov 11 12:14:10 CET 2014
On Mon, 10 Nov 2014, Luca Olivetti wrote:
> El 30/10/14 a les 22:44, Michael Van Canneyt ha escrit:
>
>>>>> On Thu, 30 Oct 2014, Luca Olivetti wrote:
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> TFixedFormatDataSet (ancestor of TSdfDataSet) overrides GetRecNo
>>>>>> (correct) but it does a strange contortion instead of simply returning
>>>>>> FCurRec:
>>>>>>
>>>>>> function TFixedFormatDataSet.GetRecNo: Longint;
>>>>>> var
>>>>>> BufPtr: TRecordBuffer;
>>>>>> begin
>>>>>> Result := -1;
>>>>>> if GetActiveRecBuf(BufPtr) then
>>>>>> Result := PRecInfo(BufPtr + FRecInfoOfs)^.RecordNumber;
>>>>>
> [...]
>> I understand why the GetRecNo is there, just not why it is implemented
>> as it is in TSDFDataset.
>> (which is what I was investigating)
>
> So, what's the verdict? Will it stay this way for the foreseeable future
> or will it be changed?
> Should I file a bug report or should it not be considered a bug?
You can file a bug report so it is not forgotten.
Michael.
More information about the fpc-pascal
mailing list