The following warnings occurred:
Warning [2] Undefined array key 0 - Line: 1677 - File: showthread.php PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/showthread.php 1677 errorHandler->error_callback
/showthread.php 916 buildtree




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Nexting a For from an IF...THEN
#2
ardentcrest Wrote:Me again Big Grin

Code:
2004 for xx=length to 1 step -1 2006 if z$(xx)=" " then next xx

Syntax Error. Unexpected token 'NEXT' <NEXT>



Why are the hard thing easy, and what should be easy hard Tongue
I've splitted this topic and moved this question into here, since it's more generic to ZX BASIC syntax. Please, post your questions separated, if possible (one in each thread), so other users might find them more useful. Idea

You can no longer NEXT a for from any point. Instead use CONTINUE FOR to next, or use EXIT FOR to stop the loop:
Code:
2004 for xx=length to 1 step -1 2006 if z$(xx)=" " then CONTINUE FOR: end if 2010 next xx

Read: <!-- m --><a class="postlink" href="http://www.boriel.com/wiki/en/index.php/ZX_BASIC:CONTINUE">http://www.boriel.com/wiki/en/index.php ... C:CONTINUE</a><!-- m -->
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)