Hey guys,
This isnt really a bug, per se, but rather it seems to be a limitation of the compiler.
Here are two background threads pertaining to my problem:
http://www.blitzbasic.com/Community/posts.php?topic=61909
http://www.blitzbasic.com/Community/posts.php?topic=61962
I've developed a test program which you can compile in order to test this problem:
edit:
argh, nevermind, looks like I have to tweak my test case a bit more in order to get to the conditions which I found in my original program.
This isnt really a bug, per se, but rather it seems to be a limitation of the compiler.
Here are two background threads pertaining to my problem:
http://www.blitzbasic.com/Community/posts.php?topic=61909
http://www.blitzbasic.com/Community/posts.php?topic=61962
I've developed a test program which you can compile in order to test this problem:
Graphics (800,600, 0) 'These variables control the size of the array, as well as dictate the depth of the recursive algorithms: Global x_size:Int = 15 Global y_size:Int = 15 Global Container:Int[x_size,y_size] 'Comment out the first function call, traverseContainer() to get the program to run: '____________________________________________________________________________________ traverseContainer(x_size/2, y_size/2) 'traverseSouthEast(x_size/2, y_size/2) 'traverseNorthWest(x_size/2, y_size/2) '____________________________________________________________________________________ While Not AppTerminate() printContainer() GCCollect() Flip Cls Wend 'recursively goes through the container and changes all of the 0's to 1's: Function traverseContainer(x_coord%, y_coord%) If Container[x_coord, y_coord] <> 1 Then Container[x_coord, y_coord] = 1 Else Return End If If x_coord > 0 Then traverseContainer(x_coord - 1, y_coord) If x_coord < x_size - 2 Then traverseContainer(x_coord + 1, y_coord) If y_coord > 0 Then traverseContainer(x_coord, y_coord - 1) If y_coord < y_size - 2 Then traverseContainer(x_coord, y_coord + 1) End Function 'recursively traverses the container in the north and west directions only: Function traverseNorthWest(x_coord%, y_coord%) If Container[x_coord, y_coord] <> 1 Then Container[x_coord, y_coord] = 1 Else Return End If If x_coord > 0 Then traverseContainer(x_coord - 1, y_coord) If y_coord > 0 Then traverseContainer(x_coord, y_coord - 1) End Function 'recursively traverses the container in the south and east directions only: Function traverseSouthEast(x_coord%, y_coord%) If Container[x_coord, y_coord] <> 1 Then Container[x_coord, y_coord] = 1 Else Return End If If x_coord < x_size - 2 Then traverseContainer(x_coord + 1, y_coord) If y_coord < y_size - 2 Then traverseContainer(x_coord, y_coord + 1) End Function 'print the container to the screen: Function printContainer() Local k:Int Local j:Int For k=0 To x_size - 1 For j=0 To y_size - 1 DrawText Container[k,j], 225 + k * 30, 100 + j * 30 Next Next End Function
edit:
argh, nevermind, looks like I have to tweak my test case a bit more in order to get to the conditions which I found in my original program.