Results 1 to 3 of 3

Thread: break?

  1. #1
    Join Date
    Mar 2007
    Posts
    1,223
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    break?

    umm i was wanderin what "break" is used for...i've seen it in many scripts and here's an example of what im talkiing about :
    SCAR Code:
    if (TimeFromMark(HGMark) > 15000) then Break;

    can sum1 thoroughly explain wat its used for?

  2. #2
    Join Date
    Jan 2007
    Location
    Tennessee
    Posts
    642
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    It brings you out of a repeat.
    SCAR Code:
    repeat
      Whatever;
      if (GetColor(100, 100) = 0) then
      Break;
    until(false);
    If it finds the color, it is told to stop repeating.
    It can also be called in things like
    SCAR Code:
    for i:= 1 to 100 do
    begin
      Whatever;
      if (GetColor(100, 100) = 0) then
      Break;
    end;

    And the last way is
    SCAR Code:
    while LoggedIn do
    begin
      Whatever;
      if (GetColor(100, 100) = 0) then
      Break;
    end;

  3. #3
    Join Date
    Mar 2007
    Posts
    1,223
    Mentioned
    0 Post(s)
    Quoted
    5 Post(s)

    Default

    Quote Originally Posted by almost View Post
    It brings you out of a repeat.
    SCAR Code:
    repeat
      Whatever;
      if (GetColor(100, 100) = 0) then
      Break;
    until(false);
    If it finds the color, it is told to stop repeating.
    It can also be called in things like
    SCAR Code:
    for i:= 1 to 100 do
    begin
      Whatever;
      if (GetColor(100, 100) = 0) then
      Break;
    end;

    And the last way is
    SCAR Code:
    while LoggedIn do
    begin
      Whatever;
      if (GetColor(100, 100) = 0) then
      Break;
    end;
    thx ...like i wished thorougly explained ..rep ++

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. break
    By jhildy in forum OSR Help
    Replies: 3
    Last Post: 08-10-2007, 05:47 PM
  2. Break;
    By macromacro123 in forum OSR Help
    Replies: 7
    Last Post: 03-13-2007, 02:52 AM
  3. Break here
    By break in forum News and General
    Replies: 1
    Last Post: 10-09-2006, 12:31 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •