Sujet : Re: Which code style do you prefer the most?
De : 643-408-1753 (at) *nospam* kylheku.com (Kaz Kylheku)
Groupes : comp.lang.cDate : 05. Mar 2025, 20:18:20
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <20250305111331.900@kylheku.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14
User-Agent : slrn/pre1.0.4-9 (Linux)
On 2025-03-05, Scott Lurndal <
scott@slp53.sl.home> wrote:
Richard Harnden <richard.nospam@gmail.invalid> writes:
On 05/03/2025 17:09, Janis Papanagnou wrote:
On 05.03.2025 17:40, bart wrote:
[...]
>
>
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
I don't think it's as simple as blaming Fortran. Fortran itself
starts the implicit integer variables at i for a reason.
That reason is that the variable i is used as an indexing dumy
variable in mathematics. I seem to recall that it's because it
is the first letter of the Latin word "index".
Using i for indexing, and then allocating nested indices using
subsequent letters after i, is a practice that long precedes
the existence of computers and Fortran.
-- TXR Programming Language: http://nongnu.org/txrCygnal: Cygwin Native Application Library: http://kylheku.com/cygnalMastodon: @Kazinator@mstdn.ca