08-24-2023, 01:02 PM
BASIC always behaved this way about FOR... NEXT. Since Dartmouth. Many programs depend on this "quirk".
This could cause problems with an _UNSIGNED variable used like this:
Expect "u" to be -1? Read the code again. Or if it were possible in QuickBASIC to compile in debug mode it would return a runtime error. This is something that never occurred to me while using QuickBASIC or QBasic. (scratch head)
This could cause problems with an _UNSIGNED variable used like this:
Code: (Select All)
DIM u AS _UNSIGNED INTEGER
FOR u = 10 TO 0 STEP -1
PRINT u
NEXT
Expect "u" to be -1? Read the code again. Or if it were possible in QuickBASIC to compile in debug mode it would return a runtime error. This is something that never occurred to me while using QuickBASIC or QBasic. (scratch head)