Excuse the n00b question, but is FB able to do recursion deeper than qb?
Sure. By default the stack size is 1 Mb. In QB it was 64 Kb. So you do the math
Somewhere V1ctor wrote that the default stack size is 1Mb, so probably you can have in FB a lot more recursion than in QB. Just try...
i'll write a dumb test later(just a proc that does some wasteful calculations, displays the current depth, till it eventually screws up with an error message)
Just try this:
Code:
Declare Sub killStack (recursionDepth%)
killStack 0
Sub KillStack (recursionDepth%)
Print recursionDepth%
KillStack (recursionDepth% + 1)
End Sub
Quote:Just try this:
Code:
Declare Sub killStack (recursionDepth%)
killStack 0
Sub KillStack (recursionDepth%)
Print recursionDepth%
KillStack (recursionDepth% + 1)
End Sub
I had 37381.
With the compiler switch -t I switched the stack to 10mb and got 373985.
I think it's far
enough :o
Recursive floodfill, anyone?
Is there any other way to do flood fill? Besides maybe a modified a* algorithm.....
i made an a* once *thinks back to challenge*
yeah i once made a flood fill i think.... i dont remember though
edit: i shoul dprobly describe it =P
it goes around (up until end, right until end, etc) and in a dead end backtracks untill it can move.