Win a copy of Mesos in Action this week in the Cloud/Virtualizaton 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: 20532
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