Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Michael Van Canneyt
On Wed, 6 Feb 2013, Sven Barth wrote: Hello Free Pascal community! I'm pleased to announce the addition of type helpers which extend the existing helper concept with the ability to extend primitive types. Haha, finally after 7 years of waiting we catch up with Morfik... Thank you very

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: With helpers you can do i.ctrl-space and get a list of methods, for example ToString; Which, for newbies, is easier than guessing IntToStr() We'll have to make some units with 'standard' helpers. Well, newbies are not to strong in

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Michael Van Canneyt
On Wed, 6 Feb 2013, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: With helpers you can do i.ctrl-space and get a list of methods, for example ToString; Which, for newbies, is easier than guessing IntToStr() We'll have to make some units with 'standard'

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: Well, newbies are not to strong in knowing what is which unit either :-) If we're talking newbies and IDE: They don't need to, if the IDE puts the unit in the uses clause to start with... That's completely new functionality. Afaik most

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Michael Van Canneyt
On Wed, 6 Feb 2013, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: Well, newbies are not to strong in knowing what is which unit either :-) If we're talking newbies and IDE: They don't need to, if the IDE puts the unit in the uses clause to start with...

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Mattias Gaertner
Marco van de Voort mar...@stack.nl hat am 6. Februar 2013 um 11:41 geschrieben: In our previous episode, Michael Van Canneyt said: Well, newbies are not to strong in knowing what is which unit either :-) If we're talking newbies and IDE: They don't need to, if the IDE puts the unit in

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Mattias Gaertner
Michael Van Canneyt mich...@freepascal.org hat am 6. Februar 2013 um 11:38 geschrieben: On Wed, 6 Feb 2013, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: With helpers you can do i.ctrl-space and get a list of methods, for example ToString; Which, for

Re: [fpc-devel] Testsuite database

2013-02-06 Thread Nikolai Zhubr
Hi Pierre, Sorry for late reply, my main computer (with mail) was temporarily out of order. I'm happy to confirm that the problem no longer exists. I do not get any error messages anymore. Also, it looks like query results are produced much faster now. Good work! Actually, I reported the

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Henry Vermaak
On Wed, Feb 06, 2013 at 11:52:27AM +0100, Michael Van Canneyt wrote: On Wed, 6 Feb 2013, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: Well, newbies are not to strong in knowing what is which unit either :-) If we're talking newbies and IDE: They don't

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Roberto P.
2013/2/6 Michael Van Canneyt mich...@freepascal.org On Wed, 6 Feb 2013, Marco van de Voort wrote: Anyway, I just wanted to point out which advantages I see (or do not see) in type helpers. By themselves, I think they are worthless. If used appropriately, they can improve the readability.

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Michael Schnell
On 02/06/2013 12:13 PM, Henry Vermaak wrote: I can see the point, but can't help to think that I'll be reading code like this soon: s := '(' + x.ToString + ', ' + y.ToString + ')'; Instead of s := Format('(%d, %d)', [x, y]); In fact to me the first expression does look really nice (even

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Michael Van Canneyt
On Wed, 6 Feb 2013, Henry Vermaak wrote: On Wed, Feb 06, 2013 at 11:52:27AM +0100, Michael Van Canneyt wrote: On Wed, 6 Feb 2013, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: Well, newbies are not to strong in knowing what is which unit either :-) If

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Michael Schnell
On 02/06/2013 12:29 PM, Michael Schnell wrote: point.x := x; point.y := y; s := point.ToString; or s := (x,y).ToString; Has there not recently been a discussion on Tupels ?!?!?! :-) -Michael ___ fpc-devel maillist -

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Paul Ishenin
06.02.13, 19:29, Michael Schnell пишет: but I feel point.x := x; point.y := y; s := point.ToString; is most clear. This is what you can already do in FPC 2.6.0 with advanced records feature active. Best regards, Paul Ishenin ___

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Sven Barth
Am 06.02.2013 10:58, schrieb Mattias Gaertner: On Wed, 06 Feb 2013 10:49:36 +0100 Sven Barth pascaldra...@googlemail.com wrote: [...] Hello Free Pascal community! === example begin === var i: LongInt; begin Writeln(i.ToString); end. And how is toString declared? I've mentioned it

Re: [fpc-devel] Extract the color data and alpha from a PNG image

2013-02-06 Thread Mattias Gaertner
silvioprog silviop...@gmail.com hat am 5. Februar 2013 um 16:08 geschrieben: 2013/2/5 Mattias Gaertner nc-gaert...@netcologne.de mailto:nc-gaert...@netcologne.de On Tue, 5 Feb 2013 12:37:24 -0200 silvioprog silviop...@gmail.com mailto:silviop...@gmail.com wrote: Hello

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Henry Vermaak
On Wed, Feb 06, 2013 at 01:12:59PM +0100, Sven Barth wrote: Am 06.02.2013 12:13, schrieb Henry Vermaak: Thanks for pointing out the advantages. I can see the point, but can't help to think that I'll be reading code like this soon: s := '(' + x.ToString + ', ' + y.ToString + ')'; Instead

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Ludo Brands
On 02/06/2013 01:12 PM, Sven Barth wrote: Am 06.02.2013 12:13, schrieb Henry Vermaak: Thanks for pointing out the advantages. I can see the point, but can't help to think that I'll be reading code like this soon: s := '(' + x.ToString + ', ' + y.ToString + ')'; Instead of s :=

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Sven Barth
Am 06.02.2013 14:26, schrieb Ludo Brands: On 02/06/2013 01:12 PM, Sven Barth wrote: Am 06.02.2013 12:13, schrieb Henry Vermaak: Thanks for pointing out the advantages. I can see the point, but can't help to think that I'll be reading code like this soon: s := '(' + x.ToString + ', ' +

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Sven Barth
Am 06.02.2013 14:03, schrieb Henry Vermaak: On Wed, Feb 06, 2013 at 01:12:59PM +0100, Sven Barth wrote: Am 06.02.2013 12:13, schrieb Henry Vermaak: Thanks for pointing out the advantages. I can see the point, but can't help to think that I'll be reading code like this soon: s := '(' +

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Sven Barth
Am 06.02.2013 12:54, schrieb Paul Ishenin: 06.02.13, 19:29, Michael Schnell пишет: but I feel point.x := x; point.y := y; s := point.ToString; is most clear. This is what you can already do in FPC 2.6.0 with advanced records feature active. Or by using record helpers if one can

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Mark Morgan Lloyd
Ludo Brands wrote: Funny to see that all these fans of a strongly typed pascal prefer Format() that is using variants, has an undetermined number of parameters, doesn't give the compiler any opportunity to check the types used and causes runtime errors when a wrong type or a wrong number of

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Alexander Klenin
On Wed, Feb 6, 2013 at 10:31 PM, Michael Schnell mschn...@lumino.de wrote: point.x := x; point.y := y; s := point.ToString; or s := (x,y).ToString; Has there not recently been a discussion on Tupels ?!?!?! :-) At least according to my proposal, tuples will not be a type, so

Re: [fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Paul Ishenin
06.02.13, 21:51, Alexander Klenin пишет: On Wed, Feb 6, 2013 at 10:31 PM, Michael Schnell mschn...@lumino.de wrote: point.x := x; point.y := y; s := point.ToString; or s := (x,y).ToString; Has there not recently been a discussion on Tupels ?!?!?! :-) At least according to my

Re: [fpc-devel] Why FreeBSD sem_init() works different to Linux?

2013-02-06 Thread Graeme Geldenhuys
Hi, OK, now that we established that semaphores are broken in FreeBSD using FPC 2.6.0 and the upcoming FPC 2.6.2. I'm looking for an alternative. An alternative for two reasons. - I hate IFDEF code, and the semaphore code between Linux, FreeBSD and Windows are different. - Semaphore

Re: [fpc-devel] Why FreeBSD sem_init() works different to Linux?

2013-02-06 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: OK, now that we established that semaphores are broken in FreeBSD using FPC 2.6.0 and the upcoming FPC 2.6.2. I'm looking for an alternative. An alternative for two reasons. - I hate IFDEF code, and the semaphore code between Linux, FreeBSD

Re: [fpc-devel] Why FreeBSD sem_init() works different to Linux?

2013-02-06 Thread Sven Barth
Am 06.02.2013 20:43 schrieb Marco van de Voort mar...@stack.nl: In our previous episode, Graeme Geldenhuys said: OK, now that we established that semaphores are broken in FreeBSD using FPC 2.6.0 and the upcoming FPC 2.6.2. I'm looking for an alternative. An alternative for two reasons.

Re: [fpc-devel] Why FreeBSD sem_init() works different to Linux?

2013-02-06 Thread Sven Barth
Am 06.02.2013 20:24 schrieb Graeme Geldenhuys gra...@geldenhuys.co.uk: Hi, OK, now that we established that semaphores are broken in FreeBSD using FPC 2.6.0 and the upcoming FPC 2.6.2. I'm looking for an alternative. An alternative for two reasons. - I hate IFDEF code, and the semaphore

Re: [fpc-devel] Why FreeBSD sem_init() works different to Linux?

2013-02-06 Thread Ewald
Hello, You can use some structure to lock an integer. `Some structure` can for example be a mutex, a critical section, some busy waiting loop based on CMPXCH, etc... Say that you lock the integer by calling `Lock;` and you unlock it by calling `UnLock;`. Then you can define a class TSemaphore

Re: [fpc-devel] Why FreeBSD sem_init() works different to Linux?

2013-02-06 Thread Martin Schreiber
On Wednesday 06 February 2013 20:24:34 Graeme Geldenhuys wrote: It case I'm overlooking something critical, has anybody else done something like this. If so, anybody willing to share that code - saving me some time in developing, unit testing and debugging my own Object Pascal based

Re: [fpc-devel] I have created a openocd debugger-interface for lazarus, now some questions

2013-02-06 Thread Michael Ring
Hi Martin, Thank you for your detailed answers and for pointing me to the testcases. I am having a look at the breakpoint code and will see what I can do so that debugging works with only a limited number of available breakpoints. One more thing, do you know why ExecuteCommand is defined as