Re: [fpc-pascal] a few trivial questions

2010-05-13 Thread Jonas Maebe
On 13 May 2010, at 17:57, Jürgen Hestermann wrote: > Jonas Maebe schrieb: > ... >>> Of course she did! Just look at trends in programming languages (and >>> styles) of the past. How can you say that nothing will change ever. >> Please take this sort of discussions to the fpc-other list. > > Wha

Re: [fpc-pascal] a few trivial questions

2010-05-13 Thread Jürgen Hestermann
Jonas Maebe schrieb: ... Of course she did! Just look at trends in programming languages (and styles) of the past. How can you say that nothing will change ever. Please take this sort of discussions to the fpc-other list. What "sort" of discussion? Is it only me or do you censore other mails

Re: [fpc-pascal] a few trivial questions

2010-05-13 Thread Jonas Maebe
On 13 May 2010, at 17:30, Jürgen Hestermann wrote: >>> In the first place it is. But if it would be available, the crowd may >>> change its mind. >> No, she won't. She never did. > > Of course she did! Just look at trends in programming languages (and styles) > of the past. How can you say that

Re: [fpc-pascal] a few trivial questions

2010-05-13 Thread Jürgen Hestermann
In the first place it is. But if it would be available, the crowd may change its mind. No, she won't. She never did. Of course she did! Just look at trends in programming languages (and styles) of the past. How can you say that nothing will change ever.

Re: [fpc-pascal] a few trivial questions

2010-05-13 Thread spir ☣
On Thu, 13 May 2010 18:24:28 +0300 Juha Manninen wrote: > Programmer count from 0 by nature. That's what separates programmers from > normal people. the programmer's naught gene ;-) Denis vit esse estrany ☣ spir.wikidot.com ___

Re: [fpc-pascal] a few trivial questions

2010-05-13 Thread Marc Weustink
Jürgen Hestermann wrote: I personally hate 0-based counting because no human counts 0, 1, 2 etc.. so why must computers? Yes. That's my feeling too. Zero-based arrays/lists always generate trouble because of substracting or adding one in many places. It makes code much less readable. Read

Re: [fpc-pascal] a few trivial questions

2010-05-13 Thread Juha Manninen
Hi! > Well, we once had a prof who counted from 0. After he had drewn a large > diagram on the board he wanted to make sure that it was indeed 12 states > as stated in the caption. So he went: 0, 1, 2, ... , 11. Hmmm... I've > seem to have missed one. Let's count again: 0, 1, 2 , 11 > > He r

Re: [fpc-pascal] a few trivial questions

2010-05-13 Thread Werner Van Belle
In our previous episode, Graeme Geldenhuys said: >> I personally hate 0-based counting because no >> human counts 0, 1, 2 etc.. >> Well, we once had a prof who counted from 0. After he had drewn a large diagram on the board he wanted to make sure that it was indeed 12 states as stated in the

Re: [fpc-pascal] a few trivial questions

2010-05-13 Thread Vinzent Höfler
Von: "Jürgen Hestermann" > > it's just easier to follow the crowd > > than fight them. :-) > > In the first place it is. But if it would be available, the crowd may > change its mind. No, she won't. She never did. Vinzent. -- GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT! Jetzt fre

Re: [fpc-pascal] a few trivial questions

2010-05-13 Thread Marco van de Voort
In our previous episode, Graeme Geldenhuys said: > At one point fpGUI switched all list type components to be 1-based. This > caused such a lot of issues that I very quickly switched it back to > 0-based. Why? Because even though my components were 1-based, the FPC lists > where 0-based. So I had t

Re: [fpc-pascal] a few trivial questions

2010-05-13 Thread spir ☣
On Thu, 13 May 2010 09:33:12 +0200 Graeme Geldenhuys wrote: > spir ☣ het geskryf: > >>> Also, is it possible to set a list's base index to 1 (so that > >>> last_index=count)? > >> No. That would break all other existing code. > > > > I don't understand. If I set myList.baseIndex := 1, how can it

Re: [fpc-pascal] a few trivial questions

2010-05-13 Thread Jürgen Hestermann
I personally hate 0-based counting because no human counts 0, 1, 2 etc.. so why must computers? Yes. That's my feeling too. Zero-based arrays/lists always generate trouble because of substracting or adding one in many places. It makes code much less readable. But because 0-based is so stand

Re: [fpc-pascal] a few trivial questions

2010-05-13 Thread Graeme Geldenhuys
spir ☣ het geskryf: >>> Also, is it possible to set a list's base index to 1 (so that >>> last_index=count)? >> No. That would break all other existing code. > > I don't understand. If I set myList.baseIndex := 1, how can it affect > other people's code? It's a new feature that does not touch exis

Re: [fpc-pascal] a few trivial questions

2010-05-12 Thread spir ☣
On Wed, 12 May 2010 16:45:47 +0200 (CEST) Michael Van Canneyt wrote: > > > On Wed, 12 May 2010, spir ☣ wrote: > > > Hello, > > > > * TFPList > > Is there another way to traverse a list than > >for i :=0 to (list.count - 1) do ... > > You can use an enumerator with the latest SVN: > > for

Re: [fpc-pascal] a few trivial questions

2010-05-12 Thread spir ☣
On Wed, 12 May 2010 17:19:57 +0200 Graeme Geldenhuys wrote: > 2010/5/12 spir ☣: > > > > * TFPList > > Is there another way to traverse a list than > >    for i :=0 to (list.count - 1) do ... > > What about list.high? > > Yes, I use the Iterator design pattern. This allows me to write code as >

Re: [fpc-pascal] a few trivial questions

2010-05-12 Thread Lee Jenkins
Michael Van Canneyt wrote: On Wed, 12 May 2010, spir ☣ wrote: Hello, * TFPList Is there another way to traverse a list than for i :=0 to (list.count - 1) do ... You can use an enumerator with the latest SVN: foreach P in List do That's good news. I wasn't aware that that had been i

Re: [fpc-pascal] a few trivial questions

2010-05-12 Thread Graeme Geldenhuys
2010/5/12 spir ☣: > > * TFPList > Is there another way to traverse a list than >    for i :=0 to (list.count - 1) do ... > What about list.high? Yes, I use the Iterator design pattern. This allows me to write code as follows: --- var itr: ITBStringIterator; begin ... itr := gIte

Re: [fpc-pascal] a few trivial questions

2010-05-12 Thread Michael Van Canneyt
On Wed, 12 May 2010, spir ☣ wrote: Hello, * TFPList Is there another way to traverse a list than for i :=0 to (list.count - 1) do ... You can use an enumerator with the latest SVN: foreach P in List do What about list.high? Count=High. Also, is it possible to set a list's base ind