Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: do {$i++} until vs. $i++ until

by Fletch (Bishop)
on Mar 25, 2008 at 04:04 UTC ( [id://676038]=note: print w/replies, xml ) Need Help??


in reply to do {$i++} until vs. $i++ until

It's consistent and orthogonal with the same construct in C. Think of it more of a syntactic construct along the lines of while( EXPR ) BLOCK continue BLOCK rather than an EXPR until EXPR where the first EXPR is a do BLOCK.

The cake is a lie.
The cake is a lie.
The cake is a lie.

Replies are listed 'Best First'.
Re^2: do {$i++} until vs. $i++ until
by jethro (Monsignor) on Mar 26, 2008 at 00:33 UTC
    Note that I did not criticize the first-execute-then-check do{} until but the first-check-then-execute of $i++ until. THAT is the code that feels wrong. That is the construct that puzzles me. Anyone know a language where this is handled the same?

    But I could live with the "wrong" construction if both cases were at least consistent with each other.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2024-04-25 20:31 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found