Sujet : Re: comments, The joy of FORTRAN
De : c186282 (at) *nospam* nnada.net (c186282)
Groupes : alt.folklore.computers comp.os.linux.miscDate : 03. Mar 2025, 05:19:41
Autres entêtes
Message-ID : <yI-cndUOFbNCsFj6nZ2dnZfqn_ednZ2d@giganews.com>
References : 1 2 3 4 5
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0
On 3/2/25 3:43 PM, John Levine wrote:
According to c186282 <c186282@nnada.net>:
Even 'clear' C is often NOT so clear - neither
the syntax or logic. You've gotta EXPLAIN every
step to yourself.
Well, yeah.
i += 2; /* add 1 to index */
Actually, that adds 2 to the index :-)
Example :
#include <stdio.h>
int main();
{
int i=0;
do
{
i += 2 ;
printf("%d\n",i);
}
while (i<10);
}
. . .
Output :
2
4
6
8
10
. . .
So ... doc is important, but it needs to be accurate.
Best to add those comments immediately, not a day or
week later when you're already forgetting.