Re: [fpc-pascal] Clone a instance of object

2013-09-22 Thread Zaher Dirkey
On Mon, Sep 23, 2013 at 8:50 AM, Sven Barth wrote: > You need to add a "Result.Assign(Self)" to your clone call and implement > a virtually inherited "Assign" method in each class where you copy all > fields. This is how "TPersistent" and its descendants do it as well. ​Yes I added assign, but a

Re: [fpc-pascal] Clone a instance of object

2013-09-22 Thread Sven Barth
Am 23.09.2013 07:15 schrieb "Zaher Dirkey" : > > Hi, > I have objects (classes) derived from base one > > TBaseObject = class(TObject) > public >constructor Create; virtual; >function Clone:TBaseObject; > end; > > TMyObject = class(TBaseObject) >my fields here > end; > > o1, o2:TmyObjec

[fpc-pascal] Clone a instance of object

2013-09-22 Thread Zaher Dirkey
Hi, I have objects (classes) derived from base one TBaseObject = class(TObject) public constructor Create; virtual; function Clone:TBaseObject; end; TMyObject = class(TBaseObject) my fields here end; o1, o2:TmyObject; o1 already created; o2 := o1.Clone; in Clone i want to create new

Re: [fpc-pascal] represent data string in hex?

2013-09-22 Thread wkitty42
On Sunday, September 22, 2013 1:25 PM, Sven Barth wrote: > On 12209201313:38, wkitt...@windstream.net wrote: > > > > On Saturday, September 21, 2013 12:03 PM, patspiper > wrote: > >> On 21/09/13 18:56, wkitt...@windstream.net wrote: > > [...] > >>> i haven't tried that... my understandin

Re: [fpc-pascal] represent data string in hex?

2013-09-22 Thread Sven Barth
On 22.09.2013 13:38, wkitt...@windstream.net wrote: On Saturday, September 21, 2013 12:03 PM, patspiper wrote: On 21/09/13 18:56, wkitt...@windstream.net wrote: [...] i haven't tried that... my understanding is that #xx depicts the decimal format of the character... eg : $FF == #255 It i

Re: [fpc-pascal] bridging an C++ shared library statically

2013-09-22 Thread Xiangrong Fang
> > Have you tried to pass options to the linker using -k? > That worked, thanks. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] bridging an C++ shared library statically

2013-09-22 Thread Mattias Gaertner
On Sun, 22 Sep 2013 10:01:40 +0800 Xiangrong Fang wrote: >[...] > {$linklib :thostmduserapi.so} >[...] > How to let ld look for library WITHOUT lib prefix? Have you tried to pass options to the linker using -k? Mattias ___ fpc-pascal maillist - fpc-

Re: [fpc-pascal] Bug in $linklib?

2013-09-22 Thread Jonas Maebe
On 21 Sep 2013, at 23:04, Xiangrong Fang wrote: > I use $linklib to link my fpc program with a C++ so file. I found that the > $linklib directive does NOT conform with ld specification. Directives conform with the fpc specifications. Not all platforms use GNU ld, and additionally ":" is a v

Re: [fpc-pascal] represent data string in hex?

2013-09-22 Thread patspiper
On 22/09/13 14:38, wkitt...@windstream.net wrote: On Saturday, September 21, 2013 12:03 PM, patspiper wrote: On 21/09/13 18:56, wkitt...@windstream.net wrote: [...] i haven't tried that... my understanding is that #xx depicts the decimal format of the character... eg : $FF == #255 It is ra

Re: [fpc-pascal] represent data string in hex?

2013-09-22 Thread wkitty42
On Sunday, September 22, 2013 7:38 AM, wkitt...@windstream.net wrote: > this worked, pat... thanks for the pointer! oops... i meant Stephano... sorry... damned webmail drek sucks... ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http:/

Re: [fpc-pascal] represent data string in hex?

2013-09-22 Thread wkitty42
On Saturday, September 21, 2013 12:03 PM, patspiper wrote: > On 21/09/13 18:56, wkitt...@windstream.net wrote: [...] > > i haven't tried that... my understanding is that #xx depicts the decimal > format of the character... > > > > eg : $FF == #255 > It is rather #$FF which is the same as #