Navigation

    Fuze Arena Logo
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Popular
    • Users
    • Groups
    • Help
    • Discord

    Tutorials/For Loops

    Bug Reporting (FUZE 4 Nintendo Switch)
    3
    3
    138
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • pico8-jihem
      pico8-jihem F last edited by pico8-jihem

      First, the documentation explains that :

      • The program above is a counter from 0 to 10.
        And next, it's explained that :
      • It will count from 0 to 9 and will not reach 10.

      So is it really a counter to 10 ? Shouldn't it be ?

      • The program above is a counter from 0 to 9.
      1 Reply Last reply Reply Quote 1
      • Discostew
        Discostew F last edited by

        While the syntax is like BASIC where it goes from 0 to 10 inclusive (making it 11 iterations), the execution is closer to languages like C, where the beginning is included but not the end.

        for( i = 0; i < 10; i++ ) {
        }
        

        So it's not a bug. However, when decrementing, it does include the last number, and I believe that's considered a bug

        1 Reply Last reply Reply Quote 1
        • M
          MikeDX last edited by

          No the report here is correct. The documentation is incorrect and it should say it is a counter from 0 to 9 and not 0 to 10

          1 Reply Last reply Reply Quote 0
          • First post
            Last post