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 p

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 sema

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 like

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" : > > 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 L

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" : > > 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 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, FreeBS

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 sem_t

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 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 wil

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

2013-02-06 Thread Alexander Klenin
On Wed, Feb 6, 2013 at 10:31 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 ?!?!?! :-) > At least according to my proposal, tuples will not be a type, so you'll have

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 para

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 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 := '(' + x.ToStr

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 + ', ' + y.ToStr

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 >> >

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 + ')'; > >

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

2013-02-06 Thread Mattias Gaertner
silvioprog hat am 5. Februar 2013 um 16:08 geschrieben: > 2013/2/5 Mattias Gaertner > >> >On Tue, 5 Feb 2013 12:37:24 -0200 > >silvioprog < silviop...@gmail.com > wrote: > > > >> Hello friends, > >> > >> I

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

2013-02-06 Thread Sven Barth
Am 06.02.2013 12:13, schrieb 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

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

2013-02-06 Thread Sven Barth
Am 06.02.2013 11:29, schrieb Michael Van Canneyt: We'll have to make some units with 'standard' helpers. I agree. I assume Delphi XE3 has such a unit, we can use that for inspiration. The problem is that Delphi stuffs all helpers into the main units... e.g. TStringHelper and TDateTimeHelper

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 wrote: [...] Hello Free Pascal community! === example begin === var i: LongInt; begin Writeln(i.ToString); end. And how is toString declared? I've mentioned it directly above the example in

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 ___ fpc-dev

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 - fpc-devel@lists.free

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

2013-02-06 Thread Michael Schnell
On 02/06/2013 12:26 PM, Michael Van Canneyt wrote: One can wonder whether s:='(%d, %d)'.format([x, y]); is more or less clear than s := Format('(%d, %d)', [x, y]); but I feel point.x := x; point.y := y; s := point.ToString; is most clear. -Michael __

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 we're

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 thou

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

2013-02-06 Thread Roberto P.
2013/2/6 Michael Van Canneyt > > > 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. R# > Mic

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: > >>

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 issue

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

2013-02-06 Thread Mattias Gaertner
Michael Van Canneyt 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. > >> and get a list of methods, for example ToString; > >> > >> Which, for newbies, is

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

2013-02-06 Thread Mattias Gaertner
Marco van de Voort 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 the

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... Tha

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

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. 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. W

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. > 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 knowing w

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

2013-02-06 Thread Michael Van Canneyt
On Wed, 6 Feb 2013, Sven Barth wrote: Am 06.02.2013 11:03, schrieb 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 t

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

2013-02-06 Thread Sven Barth
Am 06.02.2013 11:03, schrieb 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 wai

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 muc

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

2013-02-06 Thread Michael Van Canneyt
On Wed, 6 Feb 2013, Mattias Gaertner wrote: On Wed, 06 Feb 2013 10:49:36 +0100 Sven Barth wrote: [...] Hello Free Pascal community! === example begin === var i: LongInt; begin Writeln(i.ToString); end. And how is toString declared? Something like type TLongIntHelper = type

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

2013-02-06 Thread Mattias Gaertner
On Wed, 06 Feb 2013 10:49:36 +0100 Sven Barth wrote: >[...] Hello Free Pascal community! > === example begin === > > var >i: LongInt; > begin > Writeln(i.ToString); > end. And how is toString declared? Mattias ___ fpc-devel maillist - fpc-

[fpc-devel] Feature announcement: Type helpers

2013-02-06 Thread Sven Barth
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. Motivation: With class and record helpers the possibility was created to extend classes and records with types without subcla