El 16/08/17 a les 22:40, Sven Barth via Lazarus ha escrit:
On 16.08.2017 20:26, Luca Olivetti via Lazarus wrote:
El 16/08/17 a les 01:17, Graeme Geldenhuys via Lazarus ha escrit:
In hind sight, using TBytes or TMemoryStream and it would have been
very clear that it is a storage container for byte sized data, and no
automatic conversion (by the compiler) would be done to data stored in
such containers.
Call me lazy but I don't want to reinvent the wheel and re-implement
from scratch the functionality that a plain ansistring provides and
TBytes to this day doesn't.
I mean, TBytes is just an "array of char". I can't (easily) add a byte
to the end, cut a slice of the bytes, find one byte in the array, etc.
OK, I can, but I have to program it all by myself while a string does
all that and more and probably it's a lot more efficient.
Trunk supports Insert() and Delete() on dynamic arrays, Concat() and +
are on the near term ToDo list.
I started using strings as communication buffers since delphi 2. There
weren't even dynamic arrays then...
Bye
--
Luca Olivetti
Wetron Automation Technology http://www.wetron.es/
Tel. +34 93 5883004 (Ext.3010) Fax +34 93 5883007
--
_______________________________________________
Lazarus mailing list
[email protected]
https://lists.lazarus-ide.org/listinfo/lazarus