Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^4: If I was forced to use only one kind of loop for the rest of my days it would be a

by ambrus (Abbot)
on Oct 02, 2005 at 13:10 UTC ( [id://496744]=note: print w/replies, xml ) Need Help??


in reply to Re^3: If I was forced to use only one kind of loop for the rest of my days it would be a
in thread If I was forced to use only one kind of loop for the rest of my days it would be a

In fact, I belive

for(int a = 0; a<10; a++) { printf("%d\n",a); }
is equivalent to
{ int a = 0; while(a<10) { printf("%d\n",a); a++; }
Your other code,
{ int a = 0; while(a++,a<10) { printf("%d\n",a); } }
doesn't run the printf statement with a = 0.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-03-29 10:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found