Re: [fpc-pascal] Best way to insert bytes into a TBytes variable?

2017-07-29 Thread Michael Schnell
On 25.07.2017 18:00, Martok wrote: ... FPC's intrinsics such as Insert() can already work with arrays: Nonetheless, IMHO using single-Byte Strings (UTF-8 or RawByte, as a proper "uncoded" string type brand does not exist), seems more convenient, especially, as here we have lazy copy on top of

Re: [fpc-pascal] Best way to insert bytes into a TBytes variable?

2017-07-29 Thread Michael Schnell
On 25.07.2017 10:54, Bo Berglund wrote: so I need to write efficient replacements for certain string functions (Delete, Insert, Copy etc). Why do you think the string function (if using strictly just a single UTF-8 or RawByte branded String type) are not efficient ? If all string encoding b

[fpc-pascal] TThread.Priority when ?

2017-07-29 Thread fredvs
Hello. When TThread.Priority will be implemented ? Why not give a compiler message that TThread.Priority is not yet implemented when using it ? Fre;D - Many thanks ;-) -- View this message in context: http://free-pascal-general.1045716.n5.nabble.com/TThread-Priority-when-tp5729381.html

Re: [fpc-pascal] TThread.Priority when ?

2017-07-29 Thread Michael Van Canneyt
On Sat, 29 Jul 2017, fredvs wrote: Hello. When TThread.Priority will be implemented ? When someone finds it important enough to make an implementation. Why not give a compiler message that TThread.Priority is not yet implemented when using it ? Because 1. AFAIK it is implemented for wi

[fpc-pascal] XML: Differences between Delphi and FPC

2017-07-29 Thread Marcos Douglas B. Santos
Hi, FPC/Lazarus always tried stay compatible with Delphi... thus, why the FPC XML classes is so different than Delphi classes? Delphi XML is interface-based. There exists IXMLDocument, IXMLNode and so on. FPC has just classes. I have a FPC/Lazarus project that will be compatible with Delphi. I w

Re: [fpc-pascal] Best way to insert bytes into a TBytes variable?

2017-07-29 Thread Bo Berglund
On Fri, 28 Jul 2017 16:35:05 +0200, Michael Schnell wrote: >On 25.07.2017 10:54, Bo Berglund wrote: >> so I need to write efficient replacements for certain string functions >> (Delete, Insert, Copy etc). >Why do you think the string function (if using strictly just a single >UTF-8 or RawByte

[fpc-pascal] BlockWrite of dynamic arrays

2017-07-29 Thread Bo Berglund
I am converting older code to move from AnsiString to TBytes as non-text data container. While doing it I am using conditionals so I don't destroy the working code until I have verified that the TBytes usage is OK. Now I have encountered use of BlockWrite where I would like to do the following: 1