break

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Robot Tree

    break

    how do i break out of an entire method (void return type)?

    i have a loop that, under certain conditions, must contain some sort of
    method termination (assignment).

    does a 'break;' statement break out of the entire method, or just the loop?

    thanks for any consideration


  • Tony Morris

    #2
    Re: break

    "Robot Tree" <yeahsure@netsc ape.net> wrote in message
    news:JHwXb.4556 8$Ii2.26356@lak eread03...[color=blue]
    > how do i break out of an entire method (void return type)?
    >
    > i have a loop that, under certain conditions, must contain some sort of
    > method termination (assignment).
    >
    > does a 'break;' statement break out of the entire method, or just the[/color]
    loop?[color=blue]
    >
    > thanks for any consideration
    >
    >[/color]

    return;

    Some companies do not allow the use of multiple points of return from a
    method (except, of course, for exception handling) by convention.

    --
    Tony Morris
    (BInfTech, Cert 3 I.T., SCJP[1.4], SCJD)
    Software Engineer
    IBM Australia - Tivoli Security Software
    (2003 VTR1000F)


    Comment

    • Robot Tree

      #3
      Re: break


      "Tony Morris" <dibblego@optus net.com.au> wrote in message
      news:402e985d$0 $28869$afc38c87 @news.optusnet. com.au...[color=blue]
      > "Robot Tree" <yeahsure@netsc ape.net> wrote in message
      > news:JHwXb.4556 8$Ii2.26356@lak eread03...[color=green]
      > > how do i break out of an entire method (void return type)?
      > >
      > > i have a loop that, under certain conditions, must contain some sort of
      > > method termination (assignment).
      > >
      > > does a 'break;' statement break out of the entire method, or just the[/color]
      > loop?[color=green]
      > >
      > > thanks for any consideration
      > >
      > >[/color]
      >
      > return;
      >
      > Some companies do not allow the use of multiple points of return from a
      > method (except, of course, for exception handling) by convention.
      >
      > --
      > Tony Morris
      > (BInfTech, Cert 3 I.T., SCJP[1.4], SCJD)
      > Software Engineer
      > IBM Australia - Tivoli Security Software
      > (2003 VTR1000F)
      >
      >[/color]

      problem solved.
      thank you, tony


      Comment

      Working...