Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: while () vs. while (1)

by merlyn (Sage)
on Jan 24, 2011 at 22:27 UTC ( #884013=note: print w/ replies, xml ) Need Help??


in reply to while () vs. while (1)

When did it get added to the language?
Pretty sure Perl 1 worked that way so, like, 1987? :)
edit: Yes, so saith the grammar in perl.y from Perl-1.0
loop : label WHILE '(' texpr ')' compblock { $$ = wopt(add_label($1, make_ccmd(C_WHILE,$4,$6) )); } ... texpr : /* NULL means true */ { scanstr("1"); $$ = yylval.arg; } | expr ;

-- Randal L. Schwartz, Perl hacker

The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in RFC 2119.


Comment on Re: while () vs. while (1)
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://884013]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (5)
As of 2014-07-31 22:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (254 votes), past polls