Thursday, October 24, 2002

Seven Haiku to While Away the Time

Can you loop the loop?
Not just aerobatic tricks
Software does it too

For loops are easy
No extra variables
The loop does it all

While loops are tricky
Am I repeating myself?
While loops are tricky

While condition met
Loop iteration goes on
Without end, maybe

Time to exit yet?
Bump the loop counter or else
Never-ending loop

Dyjkstra had it right
Use of goto is harmful
Use of while is, too

What is to be learned?
Keep track of your indices
Or memory full