• Post Reply Bookmark Topic Watch Topic
  • New Topic

Repatative code not in a function  RSS feed

 
Matthew Tilic
Ranch Hand
Posts: 41
Chrome Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey,

I have this code that is used repeatedly and I can't put it in a function becasue it involves a series of breaks and if I do the break it would just jump outside the function and leave me in trouble.




Hope you can see my issue and thanks in advance
 
Stephan van Hulst
Saloon Keeper
Posts: 7993
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No not really. First of all, we know nothing about your code and what it's supposed to do. I also don't see any "breaks" that would force a separate method to return prematurely.

Can you explain what your code is supposed to do and show us in what contexts it's being used. Also show a scenario where it's going to break out of a function.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!