[Lazarus] Lazarus Release 1.8
Luca Olivetti
luca at wetron.es
Sat Dec 9 14:00:41 CET 2017
El 09/12/17 a les 13:23, Juha Manninen via Lazarus ha escrit:
> On Sat, Dec 9, 2017 at 12:57 PM, Luca Olivetti via Lazarus
> <lazarus at lists.lazarus-ide.org> wrote:
>> I know I'll have to upgrade to fpc 3 someday, but what worries me about it
>> is my (and other 3rd party units) use of ansistrings as binary buffers.
>
> The automatic conversions by FPC 3 could indeed mess things up.
> However you should change such binary buffers to use TBytes or similar
> in any case.
I think I had this discussion before: I'm not going to use TBytes until
it offers the same convenience as an ansistring (i.e. easy
concatenation, insertion and deletion, not to mention search and
replace, etc.).
Besides, some of it is in 3rd party libraries (but I think they
explicitly use ansistring, not the generic string type).
> There have always been warnings against using String type
> for binary data. In future your code may use $mode DelphiUnicode and
> it breaks for sure.
There weren't when I started using them in delphi 20 years ago (with no
dynamic arrays in sight).
Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007
More information about the Lazarus
mailing list