Mathieu Bouchard:
which one is the best, counting the leftmost inlet as #0, or counting it as #1 ? I ask because I have quite a bit of doc and code in which inlets are numbered, so before there's too much of it, i'd like to settle this issue.
so i'm looking to know what would be the advantages of doing it one way or another, and also, who standardized on calling it #0, and who instead chose #1.
Counting from 0 is the normal thing to do in programming languages. I think thats a good reason.
On Mon, 31 May 2004, Kjetil Svalastog Matheussen wrote:
Counting from 0 is the normal thing to do in programming languages. I think thats a good reason.
This only applies to indexes. The "first" element of an array has index 0. If you talk about elements, there is no zero'th element.
PD inlets do not have indexes .. ahem, or, do they .. :)
Guenter
--
PD-list mailing list PD-list@iem.at to manage your subscription (including un-subscription) see http://iem.at/cgi-bin/mailman/listinfo/pd-list
On Tue, 1 Jun 2004, guenter geiger wrote:
On Mon, 31 May 2004, Kjetil Svalastog Matheussen wrote:
Counting from 0 is the normal thing to do in programming languages. I think thats a good reason.
This only applies to indexes. The "first" element of an array has index 0. If you talk about elements, there is no zero'th element.
PD inlets do not have indexes .. ahem, or, do they .. :)
I still don't like start counting starting from 1. Makes me feel like a human. :)
Hallo, Kjetil Svalastog Matheussen hat gesagt: // Kjetil Svalastog Matheussen wrote:
On Tue, 1 Jun 2004, guenter geiger wrote:
On Mon, 31 May 2004, Kjetil Svalastog Matheussen wrote:
Counting from 0 is the normal thing to do in programming languages. I think thats a good reason.
This only applies to indexes. The "first" element of an array has index 0. If you talk about elements, there is no zero'th element.
PD inlets do not have indexes .. ahem, or, do they .. :)
I still don't like start counting starting from 1. Makes me feel like a human. :)
I feel with you. But in fact, in Pd several other things start from 1, for example the command line arguments for soundcard or midi devs which drove me crazy because on Linux the actual devices are numbered "the machine way" starting from 0.
Frank Barknecht _ ______footils.org__