Re: [fpc-pascal] Library.StringFunction() : PChar => NO

2014-03-17 Thread Fred van Stappen
> (not getting the name thing but wanting to enter into the spirit of the > things) PS : Cfr your studies in Poudlard school... :-) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepa

Re: [fpc-pascal] Library.StringFunction() : PChar => NO

2014-03-17 Thread Reinier Olislagers
On 16/03/2014 20:29, Fred van Stappen wrote: > Many bedankt Harry . ;-) De rien Jean-Jacques-Loup-Cristophe! (not getting the name thing but wanting to enter into the spirit of the things) ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org

Re: [fpc-pascal] Library.StringFunction() : PChar => NO

2014-03-16 Thread Fred van Stappen
> Date: Sun, 16 Mar 2014 10:43:17 +0100 > From: reinierolislag...@gmail.com > To: fpc-pascal@lists.freepascal.org > Subject: Re: [fpc-pascal] Library.StringFunction() : PChar => NO > > On 15/03/2014 12:21, Fred van Stappen wrote: > >> I thought that it was men

Re: [fpc-pascal] Library.StringFunction() : PChar => NO

2014-03-16 Thread Reinier Olislagers
On 15/03/2014 12:21, Fred van Stappen wrote: >> I thought that it was mentioned there somewhere already... >> If nit feel free to add it. That's what a wiki is good for afterall. ^^ > > Done. > > => http://wiki.freepascal.org/shared_library I think I've spotted a mistake in the wiki. I've adjus

Re: [fpc-pascal] Library.StringFunction() : PChar => NO

2014-03-15 Thread Fred van Stappen
> I thought that it was mentioned there somewhere already... > If nit feel free to add it. That's what a wiki is good for afterall. ^^ Done. => http://wiki.freepascal.org/shared_library Many thanks Sven. ___ fp

Re: [fpc-pascal] Library.StringFunction() : PChar => NO

2014-03-15 Thread Fred van Stappen
>I thought that it was mentioned there somewhere already... > If nit feel free to add it. That's what a wiki is good for afterall. ^^ Hum, never seen... I will add it ASAP ;-) > You don't need the MyString variable, you can simply use > AStringClass.SomeText. => OK > And you should definitel

Re: [fpc-pascal] Library.StringFunction() : PChar => NO

2014-03-14 Thread Sven Barth
Am 15.03.2014 00:08 schrieb "Fred van Stappen" : > > > Note: if your MyString is valid through the complete lifetime it could > > be used you can also use "Result := PChar(MyString);" > > Hum, to be sure that i understand... > > type > TStringClass = class(TObject) > Name: AnsiString; d

Re: [fpc-pascal] Library.StringFunction() : PChar => NO

2014-03-14 Thread Sven Barth
Am 14.03.2014 23:46 schrieb "Fred van Stappen" : > > > Date: Fri, 14 Mar 2014 23:11:14 +0100 > > From: pascaldra...@googlemail.com > > > To: fpc-pascal@lists.freepascal.org > > Subject: Re: [fpc-pascal] Library.StringFunction() : PChar => NO > >

Re: [fpc-pascal] Library.StringFunction() : PChar => NO

2014-03-14 Thread Fred van Stappen
> Note: if your MyString is valid through the complete lifetime it could > be used you can also use "Result := PChar(MyString);" Hum, to be sure that i understand... type TStringClass = class(TObject) Name: AnsiString; does not change SomeText: AnsiString; / may change.. en

Re: [fpc-pascal] Library.StringFunction() : PChar => NO

2014-03-14 Thread Fred van Stappen
> Date: Fri, 14 Mar 2014 23:11:14 +0100 > From: pascaldra...@googlemail.com > To: fpc-pascal@lists.freepascal.org > Subject: Re: [fpc-pascal] Library.StringFunction() : PChar => NO > > On 14.03.2014 22:07, Fred van Stappen wrote: > > > It's not a problem, as lo

Re: [fpc-pascal] Library.StringFunction() : PChar => NO

2014-03-14 Thread Sven Barth
On 14.03.2014 22:07, Fred van Stappen wrote: > It's not a problem, as long as you provide an API to dispose the memory > used by the returned PChar. > The responsibility of calling this API is delegated > to the application. Yep, with pleasure,... but how to provide an API (and what do you m

Re: [fpc-pascal] Library.StringFunction() : PChar => NO

2014-03-14 Thread Fred van Stappen
> It's not a problem, as long as you provide an API to dispose the memory > used by the returned PChar. > The responsibility of calling this API is delegated > to the application. Yep, with pleasure,... but how to provide an API (and what do you mean with "provide an API to dispose the memory") ?

Re: [fpc-pascal] Library.StringFunction() : PChar => NO

2014-03-14 Thread Fred van Stappen
> Date: Fri, 14 Mar 2014 08:20:46 -0700 > From: leledumbo_c...@yahoo.co.id > To: fpc-pascal@lists.freepascal.org > Subject: Re: [fpc-pascal] Library.StringFunction() : PChar => NO > > > It will be the memory manager of the library who deals with the PChar > result.

Re: [fpc-pascal] Library.StringFunction() : PChar => NO

2014-03-14 Thread leledumbo
> It will be the memory manager of the library who deals with the PChar result. So difficult for the main application to manage the memory used by PChar. It's not a problem, as long as you provide an API to dispose the memory used by the returned PChar. The responsibility of calling this API is de

[fpc-pascal] Library.StringFunction() : PChar => NO

2014-03-14 Thread Fred van Stappen
Hello great fpc people. It is about functions dealing with string inside a library... If i use that kind of function inside the library : >> InLibStringFunction() : PChar ; It will be the memory manager of the library who deals with the PChar result. So difficult for the main application to ma