Re: [fpc-pascal] constructor "guarantee" and other behavioural stuff

2016-01-21 Thread Mark Morgan Lloyd
Pierce Ng wrote: In this example if the constructor in TNonce isn't declared as virtual (and the on in TSomeSubNonce not as override) the TNonce.Create will be called, otherwise TSomeSubNonce will be called. Thanks Sven. Haven't had a need to do stuff like this with Object Pascal for now, but

Re: [fpc-pascal] bitmask vs sets. Is there a performance difference?

2016-01-21 Thread Graeme Geldenhuys
On 2016-01-20 23:11, Sven Barth wrote: > The maximum is currently 256 and it's the same on both platforms. That you for all the information. 256 is more than enough for what I need. As for my other question, I'll compare the assembler code to see how each option performs. Regards, - Graeme -

Re: [fpc-pascal] constructor "guarantee" and other behavioural stuff

2016-01-21 Thread Pierce Ng
On Wed, Jan 20, 2016 at 11:23:27AM +0100, Sven Barth wrote: > Note: "overload" is only necessary if you have multiple methods of the same > name with different parameters. What you probably meant is "override", but > even that is only necessary if a method in the parent was declared as > "virtual".

Re: [fpc-pascal] constructor "guarantee" and other behavioural stuff

2016-01-21 Thread Pierce Ng
On Wed, Jan 20, 2016 at 11:22:20AM +0100, Michael Van Canneyt wrote: > The whole memory area used by an instance of a class is zeroed out. > > a TNonce instance is allocated on the heap. All classes are allocated on the > heap. > TNonceBytes as a fixed-length array is part of the memory allocated

Re: [fpc-pascal] bitmask vs sets. Is there a performance difference?

2016-01-21 Thread Jonas Maebe
Nikolay Nikolov wrote on Thu, 21 Jan 2016: On 01/21/2016 01:11 AM, Sven Barth wrote: The maximum is currently 256 and it's the same on both platforms. I think you can have even larger sets, but they are not supported by the RTTI functions and the FCL streaming system. No, sets with more

Re: [fpc-pascal] bitmask vs sets. Is there a performance difference?

2016-01-21 Thread Nikolay Nikolov
On 01/21/2016 01:11 AM, Sven Barth wrote: Am 20.01.2016 19:26 schrieb "Graeme Geldenhuys" mailto:mailingli...@geldenhuys.co.uk>>: > > Is there a performance difference between using bitmask values and sets? For sets with <= 32 elements it should behave the same if I remember correctly (I d

Re: [fpc-pascal] libevent for socket

2016-01-21 Thread Michael Van Canneyt
On Thu, 21 Jan 2016, Bo Berglund wrote: On Sun, 17 Jan 2016 16:34:45 -0300, silvioprog wrote: On Tue, Jan 5, 2016 at 12:15 PM, Xiangrong Fang wrote: Hi All, Could anyone help me with some samples of writing socket program with libevent, or is there any adapter/wrapper already exists for

Re: [fpc-pascal] libevent for socket

2016-01-21 Thread Bo Berglund
On Sun, 17 Jan 2016 16:34:45 -0300, silvioprog wrote: >On Tue, Jan 5, 2016 at 12:15 PM, Xiangrong Fang wrote: > >> Hi All, >> >> Could anyone help me with some samples of writing socket program with >> libevent, or is there any adapter/wrapper already exists for freepascal? >> > >I used libevent