This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

continue?

 
Jon Camilleri
Ranch Hand
Posts: 664
Chrome Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've noticed that the command prompt does not accept negative numbers whether the statement (commented below) is commented or left without comments. What is the use of continue? Were there any applications where you had to use them, and, can you provide examples or code snippets?

 
Rob Spoor
Sheriff
Pie
Posts: 20510
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Branching Statements
 
Jim Hoglund
Ranch Hand
Posts: 525
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I find a labeled "continue'' to be very helpful when breaking out of nested loops.
I also use "break" with a label, except from within a switch. Always using labels
is just my conservative nature. I like to see exactly where the code will land.

Jim ...
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic