Announcement

Collapse
No announcement yet.

A "for" loop running a function certain amount of times.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • A "for" loop running a function certain amount of times.

    Hello,

    Hope it goes well?

    I'm trying to run a function only a certain amount of times for example 20 times using a for loop.

    The for loop works but when I insert the function the loop only then runs twice in the for loop after that the screen then restarts out of nowhere.

    Here is my for loop I'm using :

    for ( sv:=0; sv<=20; sv++)

    print(sv);
    pause(200);

    DataL(); //This is the functions name

    endif

    Any Idea?

  • #2
    Sorry forgot to show the "next" code

    next

    goto dataexit;

    Comment


    • #3
      There's nothing showing as unusual there.

      What message is on the screen when it restarts?
      Mark

      Comment


      • #4
        Nothing at all, it's not even showing "mounting" at the start

        Comment


        • #5
          Um, so what makes you think it's restarting (as opposed to clearing the screen and looping, or something)?

          Perhaps use file, zip project and attach it here
          Mark

          Comment


          • #6
            Sorry I'm seeing that it is show mounting, that means that the whole app is restarting

            Comment

            Working...
            X