Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: "return" to break out of a loop

by FunkyMonk (Chancellor)
on May 13, 2008 at 22:26 UTC ( [id://686394]=note: print w/replies, xml ) Need Help??


in reply to "return" to break out of a loop

Back in the dark ages, when I was was at uni, I was taught that every programming construct should have exactly one entry and exactly one exit point1

It sucked then, and it still sucks now. return inside a loop is perfectly acceptable.

--
1Anyone else remember Jackson Structured Programming?


Unless I state otherwise, all my code runs with strict and warnings

Replies are listed 'Best First'.
Re^2: "return" to break out of a loop
by ack (Deacon) on May 14, 2008 at 03:58 UTC

    Oh, do I remember! With the same relish as I remember being beaned in the head with a chalkboard eraser by my teacher for talking in class in 3rd Grade or of being paddled in the principal's office for getting into a fight on the playground in 4th Grade. Yeh, I remember.

    ack Albuquerque, NM

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2024-04-19 09:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found