Results 1 to 4 of 4

Thread: Counting each time the script repeats successfully

  1. #1
    Join Date
    Dec 2011
    Posts
    183
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default Counting each time the script repeats successfully

    how can we count each time a script has performed successfully and write it in the debug box?

  2. #2
    Join Date
    Dec 2011
    Location
    -bash
    Posts
    515
    Mentioned
    0 Post(s)
    Quoted
    27 Post(s)

    Default

    Inc(Count);
    writeln(Inc(Count) + 'number of runs');
    {Increases count by 1 each time it is successful}

    incex(Count, Up);
    writeln(Incex(Count, Up) + 'number of items made');
    {Increases count by the number passed to up
    So if you pass 2 to Up and Count is at 5, after this runs, Count = 7}
    Last edited by Recursive; 05-18-2012 at 06:52 AM.

  3. #3
    Join Date
    Dec 2011
    Posts
    183
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Simba Code:
    procedure Main;
    begin
      repeat
        DoSomething;
        ClearDebug;
        Inc(Count);
    writeln(Inc(Count) + 1);
      until(false);
    end;

    is this correct? because its not compiling correctly, and ihave no idea what i have done wrong

    edit: nvm figured what i done wrong, thanks anyway
    Last edited by zluo; 05-18-2012 at 08:16 AM.

  4. #4
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    When you you solve it on your own, I suggest you to post the ix for everyone (If someone is having some what same problem).


    Fixed version.

    Simba Code:
    program new;



    var
      Count :Integer;

    procedure Main;
    begin
      repeat
        //DoSomething;
        ClearDebug;
        Inc(Count);
        WriteLn(IntToStr(Count));
      until(false);
    end;



    begin
      Main;
    end.


    ~Home

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
  •