| Deutsch English Français Italiano |
|
<vqa6cu$2hqas$1@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Janis Papanagnou <janis_papanagnou+ng@hotmail.com>
Newsgroups: comp.lang.c
Subject: Re: Which code style do you prefer the most?
Date: Wed, 5 Mar 2025 19:50:04 +0100
Organization: A noiseless patient Spider
Lines: 26
Message-ID: <vqa6cu$2hqas$1@dont-email.me>
References: <vpkmq0$21php$1@dont-email.me> <vq75k8$1t6ut$2@dont-email.me>
<vq785i$1u7v7$1@dont-email.me> <20250304101022.154@kylheku.com>
<vq7shq$226p3$1@dont-email.me> <vq7u5u$21gol$2@dont-email.me>
<20250305152224.ea400cb92445c78f6a4ba523@g{oogle}mail.com>
<vq9kf0$2efj9$1@dont-email.me> <vq9mkb$2erto$1@dont-email.me>
<20250305183051.3cca469a0fd757595152b261@g{oogle}mail.com>
<vq9uqh$2g9q3$1@dont-email.me> <vqa0gr$2gmc7$1@dont-email.me>
<vqa1rq$2gr5h$1@dont-email.me> <Ea0yP.6763$SVG3.6427@fx42.iad>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 05 Mar 2025 19:50:06 +0100 (CET)
Injection-Info: dont-email.me; posting-host="c7b28c7b2c5da4ab81c18f27a162cf8b";
logging-data="2681180"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18H81caVvspHs2LWNx5OW18"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:2QvM5ysL8oplEGS6k6y6GvVJ+/Q=
In-Reply-To: <Ea0yP.6763$SVG3.6427@fx42.iad>
X-Enigmail-Draft-Status: N1110
Bytes: 2421
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)