Results 1 to 6 of 6

Thread: Difference between exit and break

  1. #1
    Join Date
    Jul 2007
    Location
    Massachusetts
    Posts
    896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Difference between exit and break

    I feel sort of stupid asking this, but whats the difference between exit and break?

  2. #2
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,553
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    exit is out of the procedure function and break is that it breaks out the loop ( a repeat until statement is needed)

  3. #3
    Join Date
    May 2007
    Location
    Netherlands, Amersfoort
    Posts
    2,701
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    Procedure MKIsBack;
    begin
      exit; // exit procedure
      WriteLn('ill never say this');
    end;

    SCAR Code:
    Procedure MKIsBackYes;
    begin
      repeat
        Wait(5000);
        break; // break free from loop
        WriteLn('Ill never say this');
      Until(false)
      WriteLn('ill say this!');
    end;

  4. #4
    Join Date
    Jul 2007
    Location
    Massachusetts
    Posts
    896
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ok, just wanted to make sure, c++ keeps confusing my scar lol

  5. #5
    Join Date
    Sep 2006
    Location
    West U.S.
    Posts
    2,172
    Mentioned
    0 Post(s)
    Quoted
    6 Post(s)

    Default

    Quote Originally Posted by Macrosoft View Post
    ok, just wanted to make sure, c++ keeps confusing my scar lol
    lol happens all the time.

    like getting your languages mixed up

    They are sisters...
    Runescape Classic

  6. #6
    Join Date
    May 2006
    Location
    Amsterdam
    Posts
    3,620
    Mentioned
    5 Post(s)
    Quoted
    0 Post(s)

    Default

    Break, breaks out of every kind of loop..
    SCAR Code:
    For I:= 0 to 99 do
    begin;
      Writeln(inttostr(I));
      if (I=10) then break;
    end;
    Exit, breaks out of procedure\function. I think it even stops the script if you put it in a MainLoop.
    Verrekte Koekwous

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. If(Not(LoggedIn)) then Exit;
    By theo in forum OSR Help
    Replies: 4
    Last Post: 10-24-2008, 05:50 PM
  2. How to exit a RickRoll in 2 steps!
    By kor in forum Computer Help and Tutorials
    Replies: 8
    Last Post: 07-02-2008, 10:26 PM
  3. exit; and logout;
    By macromacro123 in forum OSR Help
    Replies: 4
    Last Post: 03-21-2007, 01:34 PM

Posting Permissions

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