RE: [lazarus] Console app problems

2007-01-05 Thread Sam Liddicott
/07 12:07 Subject: Re: [lazarus] Console app problems Maybe it is a rare taste but I personally prefer to use code like this if XX then begin end;//if with A do begin end;//with while C do begin end;//while etc. I find very easy to locate the closing END using this little

Re: [lazarus] Console app problems

2007-01-04 Thread Marco van de Voort
On Wed, Jan 03, 2007 at 10:53:40PM +0100, Christian Iversen wrote: Not really IMHO. C has many more, mostly due to macro's. I don't think I follow. Isn't macro style mostly like function style? The macro itself is that style, but the place where the macro is placed doesn't have to

Re: [lazarus] Console app problems

2007-01-04 Thread Christian Iversen
On Thursday 04 January 2007 11:35, Marco van de Voort wrote: On Wed, Jan 03, 2007 at 10:53:40PM +0100, Christian Iversen wrote: Not really IMHO. C has many more, mostly due to macro's. I don't think I follow. Isn't macro style mostly like function style? The macro itself is

Re: [lazarus] Console app problems

2007-01-04 Thread Samuel Cartaxo
Maybe it is a rare taste but I personally prefer to use code like this if XX then begin end;//if with A do begin end;//with while C do begin end;//while etc. I find very easy to locate the closing END using this little comment after it. What do you think? Does it look wrong

Re: [lazarus] Console app problems

2007-01-04 Thread Giuseppe Luigi Punzi
IMHO I always liked the: if AAA then begin statements ... ... end; For me is the most cleared for writing code. El Jueves, 4 de Enero de 2007 13:07, Samuel Cartaxo escribió: Maybe it is a rare taste but I personally prefer to use code like this if XX then begin end;//if with

Re: [lazarus] Console app problems

2007-01-04 Thread Mattias Gaertner
On Thu, 4 Jan 2007 13:14:23 +0100 Giuseppe Luigi Punzi [EMAIL PROTECTED] wrote: IMHO I always liked the: if AAA then begin statements ... ... end; For me is the most cleared for writing code. IMHO a good code beautifier should be configurable and support all the mentioned

Re: [lazarus] Console app problems

2007-01-03 Thread Marco van de Voort
On Tue, Jan 02, 2007 at 05:51:03PM +0100, Christian Iversen wrote: for (...) { } which, imho, only looks good in C. That is practically the only (really existing) layout that I despise. Then again, there are probably even more coding styles in Pascal than in C. Not really IMHO. C has

Re: [lazarus] Console app problems

2007-01-03 Thread Christian Iversen
On Wednesday 03 January 2007 10:29, Marco van de Voort wrote: On Tue, Jan 02, 2007 at 05:51:03PM +0100, Christian Iversen wrote: for (...) { } which, imho, only looks good in C. That is practically the only (really existing) layout that I despise. I don't think it looks that bad in C,

Re: [lazarus] Console app problems

2007-01-03 Thread Marco van de Voort
On Wed, Jan 03, 2007 at 02:15:43PM +0100, Christian Iversen wrote: Then again, there are probably even more coding styles in Pascal than in C. Not really IMHO. C has many more, mostly due to macro's. I don't think I follow. Isn't macro style mostly like function style? The macro

Re: [lazarus] Console app problems

2007-01-03 Thread Christian Iversen
On Wednesday 03 January 2007 22:50, Marco van de Voort wrote: On Wed, Jan 03, 2007 at 02:15:43PM +0100, Christian Iversen wrote: Then again, there are probably even more coding styles in Pascal than in C. Not really IMHO. C has many more, mostly due to macro's. I don't think I

Re: [lazarus] Console app problems

2007-01-02 Thread Christian Iversen
On Sunday 31 December 2006 01:51, Lee Jenkins wrote: Christian Iversen wrote: I much prefer for X := 0 to 99 do begin FooStuff(); end; Hmm. That's nice too. Naturally it's a matter of taste, but I really cannot get used to the indenting of begin-end. It just looks wierd to me,

Re: [lazarus] Console app problems

2007-01-02 Thread Marco van de Voort
On Tue, Jan 02, 2007 at 03:19:32PM +0100, Christian Iversen wrote: It's something like for (int x = 0; x 99; x++) { FooStuff(); } Doesn't that look odd, too? No, why? I always do that. _ To unsubscribe:

Re: [lazarus] Console app problems

2007-01-02 Thread Christian Iversen
On Tuesday 02 January 2007 17:36, Marco van de Voort wrote: On Tue, Jan 02, 2007 at 03:19:32PM +0100, Christian Iversen wrote: It's something like for (int x = 0; x 99; x++) { FooStuff(); } Doesn't that look odd, too? No, why? I always do that. I don't know, it just

Re: [lazarus] Console app problems

2007-01-02 Thread Lee Jenkins
Christian Iversen wrote: On Sunday 31 December 2006 01:51, Lee Jenkins wrote: Christian Iversen wrote: I much prefer for X := 0 to 99 do begin FooStuff(); end; Hmm. That's nice too. Naturally it's a matter of taste, but I really cannot get used to the indenting of begin-end. It just

Re: [lazarus] Console app problems

2007-01-02 Thread Christian Iversen
On Tuesday 02 January 2007 19:33, Lee Jenkins wrote: Christian Iversen wrote: On Sunday 31 December 2006 01:51, Lee Jenkins wrote: Christian Iversen wrote: I much prefer for X := 0 to 99 do begin FooStuff(); end; Hmm. That's nice too. Naturally it's a matter of taste,

Re: [lazarus] Console app problems

2007-01-02 Thread Micha Nelissen
Lee Jenkins wrote: for (int x = 0; x 99; x++) { FooStuff(); } Doesn't that look odd, too? This is exactly the way that I format those blocks in C#! And without braces ? Like: for (int x = 0; x 99; x++) FooStuff(); ? Or FooStuff indented 2 more spaces ? Micha

Re: [lazarus] Console app problems

2007-01-02 Thread Lee Jenkins
Micha Nelissen wrote: And without braces ? Like: for (int x = 0; x 99; x++) FooStuff(); ? Or FooStuff indented 2 more spaces ? Micha The indentation. Lee -- Warm Regards, Lee _ To unsubscribe: mail [EMAIL

[lazarus] Console app problems

2006-12-30 Thread Lee Jenkins
Hi all, I'm try to write a console application that interfaces with Asterisk PBX. The pbx communicates with the console application over stndin and stdout. The problem that I'm having is that when I send a command using WriteLn, the command doesn't return as it should so I'm wonder if

Re: [lazarus] Console app problems

2006-12-30 Thread ik
On 12/30/06, Lee Jenkins [EMAIL PROTECTED] wrote: Hi all, I'm try to write a console application that interfaces with Asterisk PBX. The pbx communicates with the console application over stndin and stdout. Sorry for the question, but are you on the right library to use AGI ? The problem

Re: [lazarus] Console app problems

2006-12-30 Thread Lee Jenkins
ik wrote: On 12/30/06, Lee Jenkins [EMAIL PROTECTED] wrote: Hi all, I'm try to write a console application that interfaces with Asterisk PBX. The pbx communicates with the console application over stndin and stdout. Sorry for the question, but are you on the right library to use AGI ?

Re: [lazarus] Console app problems

2006-12-30 Thread ik
On 12/30/06, Lee Jenkins [EMAIL PROTECTED] wrote: ik wrote: On 12/30/06, Lee Jenkins [EMAIL PROTECTED] wrote: Hi all, I'm try to write a console application that interfaces with Asterisk PBX. The pbx communicates with the console application over stndin and stdout. Sorry for the

Re: [lazarus] Console app problems

2006-12-30 Thread Lee Jenkins
ik wrote: Nop, I meant that does your program is located in the right location to use AGI (I still learn Asterisk, so I'm not sure that my question is correct) :) I'm sure you use the best programming language in the list you gave :D Good News! First, I have fixed it (or worked around) and

Re: [lazarus] Console app problems

2006-12-30 Thread Lee Jenkins
Lee Jenkins wrote: Hi all, I'm try to write a console application that interfaces with Asterisk PBX. The pbx communicates with the console application over stndin and stdout. Hi all, after trying a number of different ways to get this to work, I have found a way. For some reason, it

Re: [lazarus] Console app problems

2006-12-30 Thread Lee Jenkins
ik wrote: Good luck, and if you can please share your sources :) Please find attached a simple unit to use for now. I will be finishing the more robust version in a few days (weeks?) as time permits. -- Warm Regards, Lee

Re: [lazarus] Console app problems

2006-12-30 Thread ik
On 12/30/06, Lee Jenkins [EMAIL PROTECTED] wrote: ik wrote: Good luck, and if you can please share your sources :) Please find attached a simple unit to use for now. I will be finishing the more robust version in a few days (weeks?) as time permits. Cool, a question: repeat; begin

Re: [lazarus] Console app problems

2006-12-30 Thread Lee Jenkins
ik wrote: repeat; begin ReadLn(sRead); bDone := self.ProcessSingleVar(sRead); end; until (bDone); LOL. Just makes it more readable for me. When I have to come back to some code later on (6 month, 1 year from now) I want to be as easy to sift through as possible. A little extra

Re: [lazarus] Console app problems

2006-12-30 Thread Micha Nelissen
Lee Jenkins wrote: repeat; begin ReadLn(sRead); bDone := self.ProcessSingleVar(sRead); end; until (bDone); LOL. Just makes it more readable for me. When I have to come back to The above is more readable than the following to you ? (Just asking) repeat ReadLn(sRead); bDone :=

Re: [lazarus] Console app problems

2006-12-30 Thread Lee Jenkins
Micha Nelissen wrote: Lee Jenkins wrote: repeat; begin ReadLn(sRead); bDone := self.ProcessSingleVar(sRead); end; until (bDone); LOL. Just makes it more readable for me. When I have to come back to The above is more readable than the following to you ? (Just asking) repeat

Re: [lazarus] Console app problems

2006-12-30 Thread Christian Iversen
On Sunday 31 December 2006 00:07, Lee Jenkins wrote: Micha Nelissen wrote: Lee Jenkins wrote: repeat; begin ReadLn(sRead); bDone := self.ProcessSingleVar(sRead); end; until (bDone); LOL. Just makes it more readable for me. When I have to come back to The above is more

Re: [lazarus] Console app problems

2006-12-30 Thread Darius Blaszijk
. Darius - Original Message - From: Lee Jenkins [EMAIL PROTECTED] To: lazarus@miraclec.com Sent: Saturday, December 30, 2006 3:49 PM Subject: [lazarus] Console app problems Hi all, I'm try to write a console application that interfaces with Asterisk PBX. The pbx communicates

Re: [lazarus] Console app problems

2006-12-30 Thread Lee Jenkins
Darius Blaszijk wrote: Hi Lee, I was following this thread with great interest. Is there somewhere a description how communication is defined in pbx? What commands are used and how are they structured? I personally don't know anything about asterisk but I am interested in this way of

Re: [lazarus] Console app problems

2006-12-30 Thread Lee Jenkins
Christian Iversen wrote: I much prefer for X := 0 to 99 do begin FooStuff(); end; Hmm. That's nice too. I used to Capitalize keywords too, but I've never only capitalized the first keyword in a block - that's pretty obscure to me :) I'm a big camel case kind of guy. I

RE: [lazarus] Console app problems

2006-12-30 Thread Pieter Valentijn
@miraclec.com Onderwerp: Re: [lazarus] Console app problems Micha Nelissen wrote: Lee Jenkins wrote: repeat; begin ReadLn(sRead); bDone := self.ProcessSingleVar(sRead); end; until (bDone); LOL. Just makes it more readable for me. When I have to come back to The above is more