[solved] NG Bug ?
BlitzMax Forums/BlitzMax NG/[solved] NG Bug ?
| ||
Local aaa:Object[] For Local i% = 0 To aaa.Length - 1 Print "ITER!" Next Program is printing ITER! infinitely |
| ||
For Local i:Int = 0 To -1 NextIts doing exactly what you told it to do. And its not really infinite either, it will reach 0 eventually (going through the entire 32-bit space in the process :p) Perhaps a better approach would be this, which doesnt suffer from the same "limitation": Local a:String[] For Local i:Int = 0 Until a.Length Next |
| ||
Well, it doesn't happen in vanilla. I'd say it's a bug, but easily avoidable. |
| ||
That's strange. I wouldn't expect it to print anything... I tested it on OS X and Win32 ( bcc[ng] Release Version 0.74 ), and it doesn't output anything. |
| ||
In every language I know (and I know some) code inside loop is never executed. By the way first of your example works like it should on NG - code inside loop is never executed. |
| ||
@brucey I've got version 0.71. I will check latest |
| ||
Hmm guess i was wrong. I actually expected it to work since blitz uses signed integers. But after thinking a bit, it cant. Since 0 is NOT less than -1 :p |
| ||
@brucey Which files exactly should I grab from github to update my NG? |
| ||
@wookie all things you use from https://github.com/bmx-ng -> bcc (download and compile bcc.bmx -> replace your bcc then with the new one) -> bmk (if changed - same procedure) -> brl.mod (download zip -> extract as brl.mod in bmxng/mod/...) -> pub.mod (download zip -> extract as pub.mod in bmxng/mod/...) -> other modules (if you use git - you just could pull the latest changes to your repositories, which might be already located in mod/brl.mod etc.) bmk will autocompile all modules (so make sure removing the old brl/pub.mod before, so you do not have some old .bmx-directories and precompilates stored there) bye Ron |
| ||
Or use Frisky which does all that for you ;) I know ive touted this before, but having to manually do the github dance is not very fun, especially when having to do it more than once! |
| ||
So I downloaded and recompiled all (bmk,bcc,modules) and it's... WORKING ! :) Thank you. |