05-14-2023, 10:38 PM
It's better not to provide the variable for "NEXT". Otherwise the variables have to be in reverse order they were submitted with "FOR".
It cannot be "x, y, z" listed for the "NEXT" lines. It's easier just to leave out the variables from "NEXT". Freebasic even flags this behavior of using a variable with "NEXT" in their "fu-ben" mode. It's still allowed if the user wants to compile plain QuickBASIC/QBasic code.
Code: (Select All)
FOR X = 1 to 10
FOR Y = 1 to 10
FOR Z = 1 to 10
:
NEXT Z
NEXT Y
NEXT X
It cannot be "x, y, z" listed for the "NEXT" lines. It's easier just to leave out the variables from "NEXT". Freebasic even flags this behavior of using a variable with "NEXT" in their "fu-ben" mode. It's still allowed if the user wants to compile plain QuickBASIC/QBasic code.