Results 1 to 4 of 4

Thread: Return to the start of a repeat .. until -

  1. #1
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Return to the start of a repeat .. until -

    I remember there being a way to "Force" return to the start of a repeat without it having to go through all of the motions of the rest of the repeat .. until. Does anyone recall what it is?

    Thank you in advance.

  2. #2
    Join Date
    Mar 2008
    Location
    In a cave
    Posts
    345
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Simba Code:
    Continue;
    is the way to go

    EDIT: a simple example too
    Simba Code:
    repeat
      Inc(i);
      if i = 3 then Continue;
      Writeln(i);
    until i >= 5;

    Outputs: 1, 2, 4, 5
    Last edited by bugger0001; 01-11-2011 at 02:13 PM.
    A Chinese wiseman once said: "Shu ciu!", it was considered very smart, but now people know it means: "Something stinks here!"
    FalBuggySmelter v.1.31
    [Updated on the 1st of March 2010]
    RimmBugger BETA V1.8

  3. #3
    Join Date
    Jan 2010
    Posts
    1,414
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Really? I thought "Continue;" was just another way to break out of a repeat .. until.

    Thank you, Bugger0001. I really appreciate the help!

    Quote Originally Posted by bugger0001 View Post
    Simba Code:
    Continue;
    is the way to go

  4. #4
    Join Date
    Mar 2006
    Location
    Behind you
    Posts
    3,193
    Mentioned
    61 Post(s)
    Quoted
    63 Post(s)

    Default

    Break; Breaks out of loops Continue; returns to the beginning of the Loop.

    ~BraK

    "Sometimes User's don't need the Answer spelled out with Code. Sometimes all they need is guidance and explanation of the logic to get where they are going."

Thread Information

Users Browsing this Thread

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

Posting Permissions

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