[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cat.c
From: |
Steve Schveighoffer |
Subject: |
Re: cat.c |
Date: |
Wed, 1 Apr 2009 19:59:33 -0700 (PDT) |
maxime wrote:
> Hi,
>
> in the coreutils source of cat
[snip]
> ... many understandable lines ...
> while (++argind < argc);
> ... some lines...
>
> coreutil 7.2
> file cat.c
> line 776
>
> I realy don't understand why U use a while loop in this case...
It is the end of a do...while loop. The loop executes at least once before the
condition is evaluated. It is of the form:
do
{
...
}
while(condition);
You are looking at the while(condition); as a single while loop, which it is
not.
Regards
-Steve
- cat.c, maxime, 2009/04/01
- Re: cat.c,
Steve Schveighoffer <=