Sujet : Re: Which code style do you prefer the most?
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.cDate : 05. Mar 2025, 19:50:04
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vqa6cu$2hqas$1@dont-email.me>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 05.03.2025 18:51, Scott Lurndal wrote:
Richard Harnden <richard.nospam@gmail.invalid> writes:
>
Seriously, short variable names for common things - i, j, k for loop
counters;
So, one might ask _why_ i, j, k instead of a, b, c?
Answer: Fortran IMPLICIT INTEGER
Ah, right! I forgot about that. - But is that the answer?
We've got such conventions from math; a, b, c, for lines,
x, y, z, for coordinates, p, q, r, for points, i, j, k,
for indexes, and so on. Loops often iterate over indexes.
Janis
-- for (number_of_natively_born_people_in_coast_states_without_havens = 0; number_of_natively_born_people_in_coast_states_without_havens <=maximum_number_of_natively_born_people_in_coast_states_without_havens; number_of_natively_born_people_in_coast_states_without_havens++)
Segmentation fault (core dumped)