Author Topic: We lost the nested NEXT somewhere in the version updtes... [UPDATE: we didn't]  (Read 2291 times)

0 Members and 1 Guest are viewing this topic.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
QB45 could do nested FOR/NEXT statements, and some prior versions of QB64 could, but not the more recent versions.

I think someone eliminated it, because it presents an asymmetrical alignment problem for the IDE!

so...

FOR i = 1 TO 5
    FOR j = 1 TO 10
    next i, j

cannot be used anymore. No biggie to me, but it should at least be updated in the WIKI...

http://qb64.org/wiki/NEXT

4th bullet down under description heading.

Pete

 
« Last Edit: January 06, 2019, 08:49:14 am by odin »
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/

Offline luke

  • Administrator
  • Seasoned Forum Regular
  • Posts: 324
    • View Profile
Re: We lost the nested NEXT somewhere in the version updtes...
« Reply #1 on: January 06, 2019, 07:40:37 am »
You need to get the variable order correct: NEXT j, i

I edited the dotpoint on the wiki to use this order.

Offline Pete

  • Forum Resident
  • Posts: 2361
  • Cuz I sez so, varmint!
    • View Profile
Thanks! I hadn't used that in ages. I just use NEXT without the variable. I tried it in the IDE and it even aligns the code indentation properly, no matter the method... next j, i... next: next... etc.

Pete
Want to learn how to write code on cave walls? https://www.tapatalk.com/groups/qbasic/qbasic-f1/