[fpc-pascal] Bookmark, TBookmarkStr, TBytes and BytesOf

Michael Van Canneyt michael at freepascal.org
Thu Aug 26 13:05:47 CEST 2021



On Thu, 26 Aug 2021, Santi via fpc-pascal wrote:

> El 26/08/2021 a las 11:58, Michael Van Canneyt via fpc-pascal escribió:
>> 
>> 
>> On Thu, 26 Aug 2021, Santiago A. via fpc-pascal wrote:
>> 
>>> Hello:
>>> 
>>> Freepascal 3.2.0. Windows 7-32bits
>>> 
>>> TMyObject=class   private     fDset:TDataset;    function 
>>> GetBookmark:TBookmarkStr; ... end;
>>> 
>>> function TMyObject.GetBookmark:TBookmarkStr; Begin result:=FDset.Bookmark; 
>>> end;
>>> 
>>> I get this compiling error:
>>> Incompatible types: got "TBytes" expected "AnsiString"
>>> 
>>> Nevertheless, /TbookmarkStr/ documentation example assigns bookmark 
>>> property to a TBookmarkStr variable
>>> https://www.freepascal.org/docs-html/fcl/db/tdataset.bookmark.html
>> 
>> The type used for bookmarks changed over time.
>> 
>> You really must use TBookmark.
>> 
>> I have corrected the documentation, it seems the 2 types were switched when
>> I corrected the documentation when the type actually changed. Sorry about 
>> that :/
>
> By the way, BytesOf documentation is also misleading

In what sense ?

Michael.


More information about the fpc-pascal mailing list