Results 1 to 7 of 7

Thread: could someone explain to me...

  1. #1
    Join Date
    Aug 2007
    Posts
    282
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default could someone explain to me...

    what break; and exit; exactly do? thanks a ton.

  2. #2
    Join Date
    Mar 2007
    Location
    Netherlands->Amersfoort.
    Posts
    1,615
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Exit: it will exit the procedure or fucntion.

    Break: it will break out of a loop. (it will ''ignore'' the first Until. like:
    SCAR Code:
    program Hi;
    begin;
      repeat;
        Writeln('hi');
        if Random(5) = 1 then Break;  //when random = 1 then it will break out of the loop.
      until(false);
      writeLn('breaked out of the loop');
    end.

  3. #3
    Join Date
    Aug 2007
    Posts
    282
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ohh... thank you very much.. i have been confused between these for a while now... thanks!

  4. #4
    Join Date
    Mar 2007
    Location
    Netherlands->Amersfoort.
    Posts
    1,615
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    No Problem

    You can do verry ussfull stuff with exit and break.
    Good Luck with scripting.

  5. #5
    Join Date
    Nov 2006
    Location
    NSW, Australia
    Posts
    3,487
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Default

    They're mainly used for Failsafes...

    SCAR Code:
    if not(LoggedIn) then Exit;
    [CENTER][img]http://signatures.mylivesignature.com/54486/113/4539C8FAAF3EAB109A3CC1811EF0941B.png[/img][/CENTER]
    [CENTER][BANANA]TSN ~ Vacation! ~ says :I Love Santy[/BANANA][/CENTER]

    [CENTER][BANANA]Raymond - Oh rilie? says :Your smart[/BANANA][/CENTER]

  6. #6
    Join Date
    Aug 2007
    Posts
    282
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    ya, i was just wondering if there was a diference, and there is.. thanks!

  7. #7
    Join Date
    Dec 2006
    Location
    Banville
    Posts
    3,914
    Mentioned
    12 Post(s)
    Quoted
    98 Post(s)

    Default

    I did not even know this XD
    The jealous temper of mankind, ever more disposed to censure than
    to praise the work of others, has constantly made the pursuit of new
    methods and systems no less perilous than the search after unknown
    lands and seas.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Somebody want to explain this?
    By FLUX_ in forum RuneScape News and General
    Replies: 4
    Last Post: 02-08-2008, 01:45 PM
  2. Can someone explain to me...
    By supersayian2224 in forum News and General
    Replies: 4
    Last Post: 06-13-2007, 09:58 AM
  3. Fix and explain Please
    By marzey in forum OSR Help
    Replies: 8
    Last Post: 05-19-2007, 12:17 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
  •