Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Next without For
#5
(05-02-2025, 02:42 AM)CharlieJV Wrote:
(05-02-2025, 02:19 AM)eoredson Wrote: Is this a bug or a feature?

It keeps displaying 0 continuously..

Should it say 'Next without for'??

Code: (Select All)
10 GoTo 30
20 For l = 1 To 10
  30 Print l;
40 Next
50 End
With the interpreted GW-BASIC, it gives that "Next without for" error, which makes sense.  Being interpreted, going from line 10 to line 30, the program has no idea there is a For loop going on at line 20.

QB64, though, is a compiled BASIC.  The BASIC gets transpiled to C++ before being compiled to an EXE.  We would need to dissect the C++ code to see what the compiled program is doing.
Just for the giggles, here is what BAM does:

   
Reply


Messages In This Thread
Next without For - by eoredson - 05-02-2025, 02:19 AM
RE: Next without For - by CharlieJV - 05-02-2025, 02:42 AM
RE: Next without For - by CharlieJV - 05-02-2025, 12:42 PM
RE: Next without For - by SMcNeill - 05-02-2025, 03:04 AM
RE: Next without For - by eoredson - 05-02-2025, 03:34 AM
RE: Next without For - by bplus - 05-02-2025, 01:02 PM
RE: Next without For - by CharlieJV - 05-02-2025, 03:20 PM
RE: Next without For - by bplus - 05-02-2025, 03:31 PM
RE: Next without For - by eoredson - 05-02-2025, 11:31 PM
RE: Next without For - by Kernelpanic - 05-02-2025, 10:53 PM
RE: Next without For - by bplus - 05-02-2025, 11:40 PM



Users browsing this thread: 2 Guest(s)