in reply to Re: while ()
in thread while ()

I think so too. However perlsyn suggest that it is C-style for which is really a while loop in disguise and not the other way round.

Replies are listed 'Best First'.
Re^3: while ()
by ikegami (Patriarch) on Jun 07, 2005 at 16:47 UTC

    If for is really a while in disguise, maybe they allowed while to have a empty condition to create a simple transformation from for to while.

    In other words, if

    for (a; b; c) { d }

    is translated into

    a; while (b) { d } continue { c }

    having the while accept an empty condition simplifies the translation.

    By the way, C doesn't allow an empty while condition:
    a.cpp:5: ANSI C++ forbids an empty condition for `while'