bug-coreutils
[Top][All Lists]
Advanced

[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



      




reply via email to

[Prev in Thread] Current Thread [Next in Thread]